Documentation ¶
Index ¶
- func Get(key string) (string, error)
- func GetString(key string) string
- func RegisterAppconfigServer(s *grpc.Server, srv AppconfigServer)
- type AppconfigClient
- type AppconfigServer
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetKeys() string
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) String() string
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type Result
- func (*Result) Descriptor() ([]byte, []int)
- func (m *Result) GetCode() int32
- func (m *Result) GetData() string
- func (*Result) ProtoMessage()
- func (m *Result) Reset()
- func (m *Result) String() string
- func (m *Result) XXX_DiscardUnknown()
- func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Result) XXX_Merge(src proto.Message)
- func (m *Result) XXX_Size() int
- func (m *Result) XXX_Unmarshal(b []byte) error
- type UnimplementedAppconfigServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAppconfigServer ¶
func RegisterAppconfigServer(s *grpc.Server, srv AppconfigServer)
Types ¶
type AppconfigClient ¶
type AppconfigClient interface { // 定义接口 (结构体可以复用) // 方法 (请求消息结构体) returns (返回消息结构体) {} GetAppConfig(ctx context.Context, in *Params, opts ...grpc.CallOption) (*Result, error) }
AppconfigClient is the client API for Appconfig service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAppconfigClient ¶
func NewAppconfigClient(cc *grpc.ClientConn) AppconfigClient
type AppconfigServer ¶
type AppconfigServer interface { // 定义接口 (结构体可以复用) // 方法 (请求消息结构体) returns (返回消息结构体) {} GetAppConfig(context.Context, *Params) (*Result, error) }
AppconfigServer is the server API for Appconfig service.
type Params ¶
type Params struct { Keys string `protobuf:"bytes,1,opt,name=keys,proto3" json:"keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
定义 Res 消息结构
func (*Params) Descriptor ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type Result ¶
type Result struct { Code int32 `protobuf:"varint,2,opt,name=Code,proto3" json:"Code,omitempty"` Data string `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Result) Descriptor ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) XXX_DiscardUnknown ¶
func (m *Result) XXX_DiscardUnknown()
func (*Result) XXX_Marshal ¶
func (*Result) XXX_Unmarshal ¶
type UnimplementedAppconfigServer ¶
type UnimplementedAppconfigServer struct { }
UnimplementedAppconfigServer can be embedded to have forward compatible implementations.
func (*UnimplementedAppconfigServer) GetAppConfig ¶
Click to show internal directories.
Click to hide internal directories.