cfgpltfm

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CfgpltfmClient

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

func New

func New(host string) *CfgpltfmClient

func (*CfgpltfmClient) Close

func (cli *CfgpltfmClient) Close()

func (*CfgpltfmClient) Get

func (cli *CfgpltfmClient) Get(key string, camp int32) *cfgpltfmgrpc.GetResponse

func (*CfgpltfmClient) GetAndWatch

func (cli *CfgpltfmClient) GetAndWatch(key string, camp int32, callback func(*cfgpltfmgrpc.GetResponse)) bool

func (*CfgpltfmClient) Watch

func (cli *CfgpltfmClient) Watch(callback func(*cfgpltfmgrpc.GetResponse)) bool

To ensure resources are not leaked due to the stream returned, one of the following actions must be performed:

  1. Call Close on the ClientConn.
  2. Cancel the context provided.
  3. Call RecvMsg until a non-nil error is returned. A protobuf-generated client-streaming RPC, for instance, might use the helper function CloseAndRecv (note that CloseSend does not Recv, therefore is not guaranteed to release all resources).
  4. Receive a non-nil, non-io.EOF error from Header or SendMsg.

If none of the above happen, a goroutine and a context will be leaked, and grpc will not call the optionally-configured stats handler with a stats.End message.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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