Switch from custom socket API to rpcx

This commit is contained in:
2022-04-22 17:12:30 -07:00
parent d318c584da
commit 0cdf8a4bed
24 changed files with 1569 additions and 1311 deletions

View File

@@ -1,14 +1,17 @@
package api
import "go.arsenm.dev/itd/internal/types"
import (
"context"
)
func (c *Client) Notify(title string, body string) error {
_, err := c.request(types.Request{
Type: types.ReqTypeNotify,
Data: types.ReqDataNotify{
func (c *Client) Notify(title, body string) error {
return c.itdClient.Call(
context.Background(),
"Notify",
NotifyData{
Title: title,
Body: body,
},
})
return err
nil,
)
}