client

package
v0.0.0-...-5eca219 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	Services []*Service
	// contains filtered or unexported fields
}

Conn is a connection to a gRPC server.

func DialContext

func DialContext(ctx context.Context, target string, opts ...grpc.DialOption) (*Conn, error)

DialContext connects to a gRPC server.

func New

func New(ctx context.Context, conn *grpc.ClientConn) (*Conn, error)

New takes ownership of conn.

func (*Conn) Close

func (c *Conn) Close() error

Close the gRPC client connection.

func (*Conn) Register

func (c *Conn) Register(r *service.Registry) error

Register the services which are accessible through the connection.

type Service

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

func (*Service) CreateInstance

func (s *Service) CreateInstance(ctx context.Context, config service.InstanceConfig, snapshot []byte) (service.Instance, error)

func (*Service) Discoverable

func (s *Service) Discoverable(ctx context.Context) bool

func (*Service) Properties

func (s *Service) Properties() service.Properties

Jump to

Keyboard shortcuts

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