Documentation ¶
Index ¶
- type AppClient
- type Client
- func (c *Client) GetRouteMetric(route string) routeMetric
- func (c *Client) HandleChannel(channel string, handler func(ctx context.Context, body io.Reader) error)
- func (c *Client) HandleRoute(path string, handler func(w http.ResponseWriter, r *http.Request))
- func (c *Client) Run(ctx context.Context) error
- func (c *Client) SendRequest(ctx context.Context, nodeName, path, method string, body interface{}, ...) error
- func (c *Client) WriteMessage(ctx context.Context, channel string, msg interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppClient ¶
type AppClient interface { WriteMessage(ctx context.Context, channel string, msg interface{}) error ReadMessage(ctx context.Context, channel string, message interface{}) error CommitMessage(ctx context.Context, channel string) error }
AppClient defines an interface and its methods for a dApp Client
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the struct which implements the methods of AppClient interface
func NewAppClient ¶
func NewAppClient() *Client
NewAppClient returns a new instance of the client of the AppClient package
func (*Client) GetRouteMetric ¶ added in v0.1.4
func (*Client) HandleChannel ¶
func (c *Client) HandleChannel(channel string, handler func(ctx context.Context, body io.Reader) error)
HandleChannel handles messages received in a given channel.
func (*Client) HandleRoute ¶ added in v0.1.4
HandleRoute handles messages received in a given route.
Click to show internal directories.
Click to hide internal directories.