Documentation
¶
Index ¶
- func Main()
- func NewRpcServiceConfig() *rpcServiceConfig
- func RegisterScConfigServiceServer(s *grpc.Server, srv ScConfigServiceServer)
- type EtcdClientImpl
- type RegisterResp
- func (*RegisterResp) Descriptor() ([]byte, []int)
- func (m *RegisterResp) GetIsok() bool
- func (m *RegisterResp) GetRespCode() string
- func (m *RegisterResp) GetRespMsg() string
- func (*RegisterResp) ProtoMessage()
- func (m *RegisterResp) Reset()
- func (m *RegisterResp) String() string
- func (m *RegisterResp) XXX_DiscardUnknown()
- func (m *RegisterResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RegisterResp) XXX_Merge(src proto.Message)
- func (m *RegisterResp) XXX_Size() int
- func (m *RegisterResp) XXX_Unmarshal(b []byte) error
- type ScConfigServiceClient
- type ScConfigServiceServer
- type ServiceCenter
- type ServiceMsgResp
- func (*ServiceMsgResp) Descriptor() ([]byte, []int)
- func (m *ServiceMsgResp) GetIsok() bool
- func (m *ServiceMsgResp) GetRespCode() string
- func (m *ServiceMsgResp) GetRespMsg() string
- func (*ServiceMsgResp) ProtoMessage()
- func (m *ServiceMsgResp) Reset()
- func (m *ServiceMsgResp) String() string
- func (m *ServiceMsgResp) XXX_DiscardUnknown()
- func (m *ServiceMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ServiceMsgResp) XXX_Merge(src proto.Message)
- func (m *ServiceMsgResp) XXX_Size() int
- func (m *ServiceMsgResp) XXX_Unmarshal(b []byte) error
- type SimpleServiceInfo
- func (*SimpleServiceInfo) Descriptor() ([]byte, []int)
- func (m *SimpleServiceInfo) GetAddress() string
- func (m *SimpleServiceInfo) GetCode() string
- func (m *SimpleServiceInfo) GetDescribe() string
- func (m *SimpleServiceInfo) GetId() string
- func (m *SimpleServiceInfo) GetMsg() string
- func (m *SimpleServiceInfo) GetName() string
- func (m *SimpleServiceInfo) GetPort() int32
- func (*SimpleServiceInfo) ProtoMessage()
- func (m *SimpleServiceInfo) Reset()
- func (m *SimpleServiceInfo) String() string
- func (m *SimpleServiceInfo) XXX_DiscardUnknown()
- func (m *SimpleServiceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SimpleServiceInfo) XXX_Merge(src proto.Message)
- func (m *SimpleServiceInfo) XXX_Size() int
- func (m *SimpleServiceInfo) XXX_Unmarshal(b []byte) error
- type StopReq
- func (*StopReq) Descriptor() ([]byte, []int)
- func (m *StopReq) GetServiceId() string
- func (m *StopReq) GetTestMsg() string
- func (*StopReq) ProtoMessage()
- func (m *StopReq) Reset()
- func (m *StopReq) String() string
- func (m *StopReq) XXX_DiscardUnknown()
- func (m *StopReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StopReq) XXX_Merge(src proto.Message)
- func (m *StopReq) XXX_Size() int
- func (m *StopReq) XXX_Unmarshal(b []byte) error
- type UnimplementedScConfigServiceServer
- func (*UnimplementedScConfigServiceServer) Register(ctx context.Context, req *SimpleServiceInfo) (*RegisterResp, error)
- func (*UnimplementedScConfigServiceServer) StopService(ctx context.Context, req *StopReq) (*ServiceMsgResp, error)
- func (*UnimplementedScConfigServiceServer) UnRegister(ctx context.Context, req *SimpleServiceInfo) (*RegisterResp, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRpcServiceConfig ¶
func NewRpcServiceConfig() *rpcServiceConfig
func RegisterScConfigServiceServer ¶
func RegisterScConfigServiceServer(s *grpc.Server, srv ScConfigServiceServer)
Types ¶
type EtcdClientImpl ¶
type EtcdClientImpl struct {
// contains filtered or unexported fields
}
func NewEtcdClientImpl ¶
func NewEtcdClientImpl() (cliimpl *EtcdClientImpl, err error)
type RegisterResp ¶
type RegisterResp struct { RespCode string `protobuf:"bytes,1,opt,name=respCode,proto3" json:"respCode,omitempty"` RespMsg string `protobuf:"bytes,2,opt,name=respMsg,proto3" json:"respMsg,omitempty"` Isok bool `protobuf:"varint,3,opt,name=isok,proto3" json:"isok,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RegisterResp) Descriptor ¶
func (*RegisterResp) Descriptor() ([]byte, []int)
func (*RegisterResp) GetIsok ¶
func (m *RegisterResp) GetIsok() bool
func (*RegisterResp) GetRespCode ¶
func (m *RegisterResp) GetRespCode() string
func (*RegisterResp) GetRespMsg ¶
func (m *RegisterResp) GetRespMsg() string
func (*RegisterResp) ProtoMessage ¶
func (*RegisterResp) ProtoMessage()
func (*RegisterResp) Reset ¶
func (m *RegisterResp) Reset()
func (*RegisterResp) String ¶
func (m *RegisterResp) String() string
func (*RegisterResp) XXX_DiscardUnknown ¶
func (m *RegisterResp) XXX_DiscardUnknown()
func (*RegisterResp) XXX_Marshal ¶
func (m *RegisterResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RegisterResp) XXX_Merge ¶
func (m *RegisterResp) XXX_Merge(src proto.Message)
func (*RegisterResp) XXX_Size ¶
func (m *RegisterResp) XXX_Size() int
func (*RegisterResp) XXX_Unmarshal ¶
func (m *RegisterResp) XXX_Unmarshal(b []byte) error
type ScConfigServiceClient ¶
type ScConfigServiceClient interface { // 注册 Register(ctx context.Context, in *SimpleServiceInfo, opts ...grpc.CallOption) (*RegisterResp, error) UnRegister(ctx context.Context, in *SimpleServiceInfo, opts ...grpc.CallOption) (*RegisterResp, error) // 停止服务 StopService(ctx context.Context, in *StopReq, opts ...grpc.CallOption) (*ServiceMsgResp, error) }
ScConfigServiceClient is the client API for ScConfigService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewScConfigServiceClient ¶
func NewScConfigServiceClient(cc *grpc.ClientConn) ScConfigServiceClient
type ScConfigServiceServer ¶
type ScConfigServiceServer interface { // 注册 Register(context.Context, *SimpleServiceInfo) (*RegisterResp, error) UnRegister(context.Context, *SimpleServiceInfo) (*RegisterResp, error) // 停止服务 StopService(context.Context, *StopReq) (*ServiceMsgResp, error) }
ScConfigServiceServer is the server API for ScConfigService service.
type ServiceCenter ¶
type ServiceCenter interface {
// contains filtered or unexported methods
}
type ServiceMsgResp ¶
type ServiceMsgResp struct { Isok bool `protobuf:"varint,1,opt,name=isok,proto3" json:"isok,omitempty"` RespCode string `protobuf:"bytes,2,opt,name=respCode,proto3" json:"respCode,omitempty"` RespMsg string `protobuf:"bytes,3,opt,name=respMsg,proto3" json:"respMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
通用简单的 消息返回
func (*ServiceMsgResp) Descriptor ¶
func (*ServiceMsgResp) Descriptor() ([]byte, []int)
func (*ServiceMsgResp) GetIsok ¶
func (m *ServiceMsgResp) GetIsok() bool
func (*ServiceMsgResp) GetRespCode ¶
func (m *ServiceMsgResp) GetRespCode() string
func (*ServiceMsgResp) GetRespMsg ¶
func (m *ServiceMsgResp) GetRespMsg() string
func (*ServiceMsgResp) ProtoMessage ¶
func (*ServiceMsgResp) ProtoMessage()
func (*ServiceMsgResp) Reset ¶
func (m *ServiceMsgResp) Reset()
func (*ServiceMsgResp) String ¶
func (m *ServiceMsgResp) String() string
func (*ServiceMsgResp) XXX_DiscardUnknown ¶
func (m *ServiceMsgResp) XXX_DiscardUnknown()
func (*ServiceMsgResp) XXX_Marshal ¶
func (m *ServiceMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ServiceMsgResp) XXX_Merge ¶
func (m *ServiceMsgResp) XXX_Merge(src proto.Message)
func (*ServiceMsgResp) XXX_Size ¶
func (m *ServiceMsgResp) XXX_Size() int
func (*ServiceMsgResp) XXX_Unmarshal ¶
func (m *ServiceMsgResp) XXX_Unmarshal(b []byte) error
type SimpleServiceInfo ¶
type SimpleServiceInfo struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` // 服务名称 Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // 服务描述 Describe string `protobuf:"bytes,5,opt,name=describe,proto3" json:"describe,omitempty"` Address string `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"` // int类型 只有 32或者64. // int32, int64 Port int32 `protobuf:"varint,7,opt,name=port,proto3" json:"port,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SimpleServiceInfo) Descriptor ¶
func (*SimpleServiceInfo) Descriptor() ([]byte, []int)
func (*SimpleServiceInfo) GetAddress ¶
func (m *SimpleServiceInfo) GetAddress() string
func (*SimpleServiceInfo) GetCode ¶
func (m *SimpleServiceInfo) GetCode() string
func (*SimpleServiceInfo) GetDescribe ¶
func (m *SimpleServiceInfo) GetDescribe() string
func (*SimpleServiceInfo) GetId ¶
func (m *SimpleServiceInfo) GetId() string
func (*SimpleServiceInfo) GetMsg ¶
func (m *SimpleServiceInfo) GetMsg() string
func (*SimpleServiceInfo) GetName ¶
func (m *SimpleServiceInfo) GetName() string
func (*SimpleServiceInfo) GetPort ¶
func (m *SimpleServiceInfo) GetPort() int32
func (*SimpleServiceInfo) ProtoMessage ¶
func (*SimpleServiceInfo) ProtoMessage()
func (*SimpleServiceInfo) Reset ¶
func (m *SimpleServiceInfo) Reset()
func (*SimpleServiceInfo) String ¶
func (m *SimpleServiceInfo) String() string
func (*SimpleServiceInfo) XXX_DiscardUnknown ¶
func (m *SimpleServiceInfo) XXX_DiscardUnknown()
func (*SimpleServiceInfo) XXX_Marshal ¶
func (m *SimpleServiceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SimpleServiceInfo) XXX_Merge ¶
func (m *SimpleServiceInfo) XXX_Merge(src proto.Message)
func (*SimpleServiceInfo) XXX_Size ¶
func (m *SimpleServiceInfo) XXX_Size() int
func (*SimpleServiceInfo) XXX_Unmarshal ¶
func (m *SimpleServiceInfo) XXX_Unmarshal(b []byte) error
type StopReq ¶
type StopReq struct { ServiceId string `protobuf:"bytes,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"` TestMsg string `protobuf:"bytes,2,opt,name=testMsg,proto3" json:"testMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StopReq) Descriptor ¶
func (*StopReq) GetServiceId ¶
func (*StopReq) GetTestMsg ¶
func (*StopReq) ProtoMessage ¶
func (*StopReq) ProtoMessage()
func (*StopReq) XXX_DiscardUnknown ¶
func (m *StopReq) XXX_DiscardUnknown()
func (*StopReq) XXX_Marshal ¶
func (*StopReq) XXX_Unmarshal ¶
type UnimplementedScConfigServiceServer ¶
type UnimplementedScConfigServiceServer struct { }
UnimplementedScConfigServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedScConfigServiceServer) Register ¶
func (*UnimplementedScConfigServiceServer) Register(ctx context.Context, req *SimpleServiceInfo) (*RegisterResp, error)
func (*UnimplementedScConfigServiceServer) StopService ¶
func (*UnimplementedScConfigServiceServer) StopService(ctx context.Context, req *StopReq) (*ServiceMsgResp, error)
func (*UnimplementedScConfigServiceServer) UnRegister ¶
func (*UnimplementedScConfigServiceServer) UnRegister(ctx context.Context, req *SimpleServiceInfo) (*RegisterResp, error)
Click to show internal directories.
Click to hide internal directories.