client

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2021 License: MIT Imports: 8 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(nc *nats.Conn) (*Client, error)

NewService create a service instance

func (*Client) Close

func (c *Client) Close()

func (*Client) Get

func (c *Client) Get(service string, params map[string]interface{}) (*discovery.GetResponse, error)

func (*Client) KeepAlive

func (c *Client) KeepAlive(node discovery.Node) error

func (*Client) Watch

func (c *Client) Watch(ctx context.Context, service string, handleNodeState NodeStateChangeCallback) error

type NodeStateChangeCallback

type NodeStateChangeCallback func(state discovery.NodeState, node *discovery.Node)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL