Documentation ¶
Index ¶
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) HandleChannel ¶
func (c *Client) HandleChannel(channel string, handler func(ctx context.Context, body io.Reader) error)
HandleChannel handles messages received in a given channel.
Click to show internal directories.
Click to hide internal directories.