kk_etcd_tool

package
v1.3.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientHub

type ClientHub[T any] struct {
	// contains filtered or unexported fields
}

func NewClientHub

func NewClientHub[T any](
	serviceType string,
	serviceName string,
	clientBuilder func(grpcConn grpc.ClientConnInterface) (client T)) *ClientHub[T]

NewClientHub create a new ClientHub

func (*ClientHub[T]) GetClient added in v1.3.3

func (c *ClientHub[T]) GetClient(stage *kk_stage.Stage) *T

GetClient get a random grpc client

func (*ClientHub[T]) ListenServerChange added in v1.3.3

func (c *ClientHub[T]) ListenServerChange(ctx context.Context, stage *kk_stage.Stage) error

ListenServerChange use ctx cancelFunc to stop Listening

Jump to

Keyboard shortcuts

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