Documentation ¶
Index ¶
- type CfgpltfmClient
- func (cli *CfgpltfmClient) Close()
- func (cli *CfgpltfmClient) Get(key string, camp int32) *cfgpltfmgrpc.GetResponse
- func (cli *CfgpltfmClient) GetAndWatch(key string, camp int32, callback func(*cfgpltfmgrpc.GetResponse)) bool
- func (cli *CfgpltfmClient) Watch(callback func(*cfgpltfmgrpc.GetResponse)) bool
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:
- Call Close on the ClientConn.
- Cancel the context provided.
- 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).
- 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.
Click to show internal directories.
Click to hide internal directories.