discovery

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: May 5, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDiscoveryClient

func NewDiscoveryClient(conn gopi.RPCClientConn) gopi.RPCClient

Types

type Client

type Client struct {
	pb.DiscoveryClient
	// contains filtered or unexported fields
}

func (*Client) Conn

func (this *Client) Conn() gopi.RPCClientConn

func (*Client) Enumerate

func (this *Client) Enumerate(t rpc.DiscoveryType, timeout time.Duration) ([]string, error)

Enumerate service names

func (*Client) Lookup

func (this *Client) Lookup(service string, t rpc.DiscoveryType, timeout time.Duration) ([]gopi.RPCServiceRecord, error)

Lookup service instances

func (*Client) NewContext

func (this *Client) NewContext(timeout time.Duration) context.Context

func (*Client) Ping

func (this *Client) Ping() error

func (*Client) Register

func (this *Client) Register(service gopi.RPCServiceRecord) error

Register a service record

func (*Client) StreamEvents

func (this *Client) StreamEvents(service string, events chan<- gopi.RPCEvent) error

Stream events

func (*Client) String

func (this *Client) String() string

type Service

type Service struct {
	Server    gopi.RPCServer
	Discovery gopi.RPCServiceDiscovery
}

func (Service) Open

func (config Service) Open(log gopi.Logger) (gopi.Driver, error)

Open the server

Jump to

Keyboard shortcuts

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