Documentation ¶
Index ¶
- Constants
- func RegisterBiRequestStreamServer(s *grpc.Server, srv BiRequestStreamServer)
- func RegisterRequestServer(s *grpc.Server, srv RequestServer)
- type BaseRequest
- type BaseResponse
- type BatchInstanceRequest
- type BatchInstanceResponse
- type BiRequestStreamClient
- type BiRequestStreamServer
- type BiRequestStream_RequestBiStreamClient
- type BiRequestStream_RequestBiStreamServer
- type ClientAbilities
- type ClientConfigAbility
- type ClientDetectionRequest
- type ClientDetectionResponse
- type ClientNamingAbility
- type ClientRemoteAbility
- type ConfigBatchListenRequest
- type ConfigChangeBatchListenResponse
- type ConfigChangeNotifyRequest
- type ConfigChangeNotifyResponse
- type ConfigContext
- type ConfigListenContext
- type ConfigPublishRequest
- type ConfigPublishResponse
- type ConfigQueryRequest
- type ConfigQueryResponse
- type ConfigRemoveRequest
- type ConfigRemoveResponse
- type ConfigRequest
- type ConnectResetRequest
- type ConnectResetResponse
- type ConnectionSetupRequest
- type CustomerPayload
- type ErrorResponse
- type HealthCheckRequest
- type HealthCheckResponse
- type InstanceRequest
- type InstanceResponse
- type InternalRequest
- type MetaRequestInfo
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)
- func (m *Metadata) GetClientIp() string
- func (m *Metadata) GetHeaders() map[string]string
- func (m *Metadata) GetType() string
- func (*Metadata) ProtoMessage()
- func (m *Metadata) Reset()
- func (m *Metadata) String() string
- func (m *Metadata) XXX_DiscardUnknown()
- func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Metadata) XXX_Merge(src proto.Message)
- func (m *Metadata) XXX_Size() int
- func (m *Metadata) XXX_Unmarshal(b []byte) error
- type NamingRequest
- type NotifySubscriberRequest
- type NotifySubscriberResponse
- type Payload
- func (*Payload) Descriptor() ([]byte, []int)
- func (m *Payload) GetBody() *anypb.Any
- func (m *Payload) GetMetadata() *Metadata
- func (*Payload) ProtoMessage()
- func (m *Payload) Reset()
- func (m *Payload) String() string
- func (m *Payload) XXX_DiscardUnknown()
- func (m *Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Payload) XXX_Merge(src proto.Message)
- func (m *Payload) XXX_Size() int
- func (m *Payload) XXX_Unmarshal(b []byte) error
- type PersistentInstanceRequest
- type QueryServiceResponse
- type Request
- type RequestClient
- type RequestMeta
- type RequestServer
- type Response
- type ServerCheckRequest
- type ServerCheckResponse
- type ServiceListRequest
- type ServiceListResponse
- type ServiceQueryRequest
- type SubscribeServiceRequest
- type SubscribeServiceResponse
Constants ¶
const ( TypeConnectionSetupRequest = "ConnectionSetupRequest" TypeConnectResetRequest = "ConnectResetRequest" TypeClientDetectionRequest = "ClientDetectionRequest" TypeHealthCheckRequest = "HealthCheckRequest" TypeServerCheckRequest = "ServerCheckRequest" TypeInstanceRequest = "InstanceRequest" TypePersistentInstanceRequest = "PersistentInstanceRequest" TypeBatchInstanceRequest = "BatchInstanceRequest" TypeNotifySubscriberRequest = "NotifySubscriberRequest" TypeSubscribeServiceRequest = "SubscribeServiceRequest" TypeServiceListRequest = "ServiceListRequest" TypeServiceQueryRequest = "ServiceQueryRequest" TypeConfigPublishRequest = "ConfigPublishRequest" TypeConfigQueryRequest = "ConfigQueryRequest" TypeConfigRemoveRequest = "ConfigRemoveRequest" TypeConfigBatchListenRequest = "ConfigBatchListenRequest" )
const ( TypeConnectResetResponse = "ConnectResetResponse" TypeClientDetectionResponse = "ClientDetectionResponse" TypeServerCheckResponse = "ServerCheckResponse" TypeInstanceResponse = "InstanceResponse" TypeBatchInstanceResponse = "BatchInstanceResponse" TypeQueryServiceResponse = "QueryServiceResponse" TypeSubscribeServiceResponse = "SubscribeServiceResponse" TypeServiceListResponse = "ServiceListResponse" TypeNotifySubscriberResponse = "NotifySubscriberResponse" TypeHealthCheckResponse = "HealthCheckResponse" TypeErrorResponse = "ErrorResponse" TypeConfigChangeNotifyResponse = "ConfigChangeNotifyResponse" )
Variables ¶
This section is empty.
Functions ¶
func RegisterBiRequestStreamServer ¶
func RegisterBiRequestStreamServer(s *grpc.Server, srv BiRequestStreamServer)
func RegisterRequestServer ¶
func RegisterRequestServer(s *grpc.Server, srv RequestServer)
Types ¶
type BaseRequest ¶
type BaseRequest interface { GetHeaders() map[string]string GetRequestType() string GetBody(request BaseRequest) string PutAllHeaders(headers map[string]string) GetRequestId() string GetStringToSign() string }
BaseRequest
type BaseResponse ¶
type BaseResponse interface { GetResponseType() string SetRequestId(requestId string) GetRequestId() string GetBody() string GetErrorCode() int IsSuccess() bool GetResultCode() int GetMessage() string }
BaseResponse
type BatchInstanceRequest ¶
type BatchInstanceRequest struct { *NamingRequest Type string `json:"type"` Instances []*model.Instance `json:"instances"` }
BatchInstanceRequest .
func NewBatchInstanceRequest ¶
func NewBatchInstanceRequest() *BatchInstanceRequest
func (*BatchInstanceRequest) GetRequestType ¶
func (r *BatchInstanceRequest) GetRequestType() string
func (*BatchInstanceRequest) Normalize ¶
func (r *BatchInstanceRequest) Normalize()
func (*BatchInstanceRequest) RequestMeta ¶
func (n *BatchInstanceRequest) RequestMeta() interface{}
type BatchInstanceResponse ¶
BatchInstanceResponse
func (*BatchInstanceResponse) GetResponseType ¶
func (c *BatchInstanceResponse) GetResponseType() string
type BiRequestStreamClient ¶
type BiRequestStreamClient interface { // Sends a commonRequest RequestBiStream(ctx context.Context, opts ...grpc.CallOption) (BiRequestStream_RequestBiStreamClient, error) }
BiRequestStreamClient is the client API for BiRequestStream service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBiRequestStreamClient ¶
func NewBiRequestStreamClient(cc *grpc.ClientConn) BiRequestStreamClient
type BiRequestStreamServer ¶
type BiRequestStreamServer interface { // Sends a commonRequest RequestBiStream(BiRequestStream_RequestBiStreamServer) error }
BiRequestStreamServer is the server API for BiRequestStream service.
type ClientAbilities ¶
type ClientAbilities struct { // RemoteAbility . RemoteAbility ClientRemoteAbility `json:"remoteAbility"` // ConfigAbility . ConfigAbility ClientConfigAbility `json:"configAbility"` // NamingAbility . NamingAbility ClientNamingAbility `json:"namingAbility"` }
ClientAbilities 客户端能力协商请求
type ClientConfigAbility ¶
type ClientConfigAbility struct { // SupportRemoteMetrics . SupportRemoteMetrics bool `json:"supportRemoteMetrics"` }
type ClientDetectionRequest ¶
type ClientDetectionRequest struct {
*InternalRequest
}
ClientDetectionRequest
func NewClientDetectionRequest ¶
func NewClientDetectionRequest() *ClientDetectionRequest
func (*ClientDetectionRequest) GetRequestType ¶
func (r *ClientDetectionRequest) GetRequestType() string
type ClientDetectionResponse ¶
type ClientDetectionResponse struct {
*Response
}
ClientDetectionResponse
func (*ClientDetectionResponse) GetResponseType ¶
func (c *ClientDetectionResponse) GetResponseType() string
type ClientNamingAbility ¶
type ClientRemoteAbility ¶
type ClientRemoteAbility struct { // SupportRemoteConnection . SupportRemoteConnection bool `json:"supportRemoteConnection"` }
ClientRemoteAbility 客户端支持长连接功能
type ConfigBatchListenRequest ¶
type ConfigBatchListenRequest struct { *ConfigRequest Listen bool `json:"listen"` ConfigListenContexts []ConfigListenContext `json:"configListenContexts"` }
ConfigBatchListenRequest request of listening a batch of configs.
func NewConfigBatchListenRequest ¶
func NewConfigBatchListenRequest() *ConfigBatchListenRequest
func (*ConfigBatchListenRequest) GetRequestType ¶
func (r *ConfigBatchListenRequest) GetRequestType() string
func (*ConfigBatchListenRequest) RequestMeta ¶
func (c *ConfigBatchListenRequest) RequestMeta() interface{}
func (*ConfigBatchListenRequest) ToSpec ¶
func (c *ConfigBatchListenRequest) ToSpec() *config_manage.ClientWatchConfigFileRequest
type ConfigChangeBatchListenResponse ¶
type ConfigChangeBatchListenResponse struct { *Response ChangedConfigs []ConfigContext `json:"changedConfigs"` }
func NewConfigChangeBatchListenResponse ¶
func NewConfigChangeBatchListenResponse() *ConfigChangeBatchListenResponse
func (*ConfigChangeBatchListenResponse) GetResponseType ¶
func (c *ConfigChangeBatchListenResponse) GetResponseType() string
type ConfigChangeNotifyRequest ¶
type ConfigChangeNotifyRequest struct {
*ConfigRequest
}
func NewConfigChangeNotifyRequest ¶
func NewConfigChangeNotifyRequest() *ConfigChangeNotifyRequest
func (*ConfigChangeNotifyRequest) GetRequestType ¶
func (r *ConfigChangeNotifyRequest) GetRequestType() string
type ConfigChangeNotifyResponse ¶
type ConfigChangeNotifyResponse struct {
*Response
}
func (*ConfigChangeNotifyResponse) GetResponseType ¶
func (c *ConfigChangeNotifyResponse) GetResponseType() string
type ConfigContext ¶
type ConfigListenContext ¶
type ConfigPublishRequest ¶
type ConfigPublishRequest struct { *ConfigRequest Content string `json:"content"` CasMd5 string `json:"casMd5"` AdditionMap map[string]string `json:"additionMap"` }
func NewConfigPublishRequest ¶
func NewConfigPublishRequest() *ConfigPublishRequest
func (*ConfigPublishRequest) GetRequestType ¶
func (r *ConfigPublishRequest) GetRequestType() string
func (*ConfigPublishRequest) RequestMeta ¶
func (c *ConfigPublishRequest) RequestMeta() interface{}
func (*ConfigPublishRequest) ToSpec ¶
func (c *ConfigPublishRequest) ToSpec() *config_manage.ConfigFilePublishInfo
type ConfigPublishResponse ¶
type ConfigPublishResponse struct {
*Response
}
func (*ConfigPublishResponse) GetResponseType ¶
func (c *ConfigPublishResponse) GetResponseType() string
type ConfigQueryRequest ¶
type ConfigQueryRequest struct { *ConfigRequest Tag string `json:"tag"` }
func NewConfigQueryRequest ¶
func NewConfigQueryRequest() *ConfigQueryRequest
func (*ConfigQueryRequest) GetRequestType ¶
func (r *ConfigQueryRequest) GetRequestType() string
func (*ConfigQueryRequest) RequestMeta ¶
func (c *ConfigQueryRequest) RequestMeta() interface{}
func (*ConfigQueryRequest) ToQuerySpec ¶
func (c *ConfigQueryRequest) ToQuerySpec() *config_manage.ClientConfigFileInfo
type ConfigQueryResponse ¶
type ConfigQueryResponse struct { *Response Content string `json:"content"` EncryptedDataKey string `json:"encryptedDataKey"` ContentType string `json:"contentType"` Md5 string `json:"md5"` LastModified int64 `json:"lastModified"` IsBeta bool `json:"isBeta"` Tag bool `json:"tag"` }
func (*ConfigQueryResponse) GetResponseType ¶
func (c *ConfigQueryResponse) GetResponseType() string
type ConfigRemoveRequest ¶
type ConfigRemoveRequest struct {
*ConfigRequest
}
func NewConfigRemoveRequest ¶
func NewConfigRemoveRequest() *ConfigRemoveRequest
func (*ConfigRemoveRequest) GetRequestType ¶
func (r *ConfigRemoveRequest) GetRequestType() string
func (*ConfigRemoveRequest) RequestMeta ¶
func (c *ConfigRemoveRequest) RequestMeta() interface{}
func (*ConfigRemoveRequest) ToSpec ¶
func (c *ConfigRemoveRequest) ToSpec() *config_manage.ConfigFile
type ConfigRemoveResponse ¶
type ConfigRemoveResponse struct {
*Response
}
func (*ConfigRemoveResponse) GetResponseType ¶
func (c *ConfigRemoveResponse) GetResponseType() string
type ConfigRequest ¶
type ConfigRequest struct { *Request Group string `json:"group"` DataId string `json:"dataId"` Tenant string `json:"tenant"` Module string `json:"module"` }
func NewConfigRequest ¶
func NewConfigRequest() *ConfigRequest
func (*ConfigRequest) GetDataId ¶
func (r *ConfigRequest) GetDataId() string
func (*ConfigRequest) GetGroup ¶
func (r *ConfigRequest) GetGroup() string
func (*ConfigRequest) GetTenant ¶
func (r *ConfigRequest) GetTenant() string
func (*ConfigRequest) RequestMeta ¶
func (c *ConfigRequest) RequestMeta() interface{}
type ConnectResetRequest ¶
type ConnectResetRequest struct { *InternalRequest ServerIp string ServerPort string }
ConnectResetRequest
func NewConnectResetRequest ¶
func NewConnectResetRequest() *ConnectResetRequest
func (*ConnectResetRequest) GetRequestType ¶
func (r *ConnectResetRequest) GetRequestType() string
type ConnectResetResponse ¶
type ConnectResetResponse struct {
*Response
}
ConnectResetResponse
func (*ConnectResetResponse) GetResponseType ¶
func (c *ConnectResetResponse) GetResponseType() string
type ConnectionSetupRequest ¶
type ConnectionSetupRequest struct { *InternalRequest ClientVersion string `json:"clientVersion"` Tenant string `json:"tenant"` Labels map[string]string `json:"labels"` ClientAbilities ClientAbilities `json:"clientAbilities"` }
ConnectionSetupRequest
func NewConnectionSetupRequest ¶
func NewConnectionSetupRequest() *ConnectionSetupRequest
NewConnectionSetupRequest .
func (*ConnectionSetupRequest) GetRequestType ¶
func (r *ConnectionSetupRequest) GetRequestType() string
type ErrorResponse ¶
type ErrorResponse struct {
*Response
}
ErrorResponse
func (*ErrorResponse) GetResponseType ¶
func (c *ErrorResponse) GetResponseType() string
type HealthCheckRequest ¶
type HealthCheckRequest struct {
*InternalRequest
}
HealthCheckRequest
func NewHealthCheckRequest ¶
func NewHealthCheckRequest() *HealthCheckRequest
NewHealthCheckRequest .
func (*HealthCheckRequest) GetRequestType ¶
func (r *HealthCheckRequest) GetRequestType() string
type HealthCheckResponse ¶
type HealthCheckResponse struct {
*Response
}
HealthCheckResponse
func NewHealthCheckResponse ¶
func NewHealthCheckResponse() *HealthCheckResponse
NewHealthCheckResponse
func (*HealthCheckResponse) GetResponseType ¶
func (c *HealthCheckResponse) GetResponseType() string
type InstanceRequest ¶
type InstanceRequest struct { *NamingRequest Type string `json:"type"` Instance model.Instance `json:"instance"` }
InstanceRequest
func (*InstanceRequest) GetRequestType ¶
func (r *InstanceRequest) GetRequestType() string
func (*InstanceRequest) RequestMeta ¶
func (n *InstanceRequest) RequestMeta() interface{}
type InstanceResponse ¶
InstanceResponse
func (*InstanceResponse) GetResponseType ¶
func (c *InstanceResponse) GetResponseType() string
type InternalRequest ¶
InternalRequest
type MetaRequestInfo ¶
type MetaRequestInfo interface {
RequestMeta() interface{}
}
type Metadata ¶
type Metadata struct { Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` ClientIp string `protobuf:"bytes,8,opt,name=clientIp,proto3" json:"clientIp,omitempty"` Headers map[string]string `` /* 155-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Metadata) Descriptor ¶
func (*Metadata) GetClientIp ¶
func (*Metadata) GetHeaders ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) XXX_DiscardUnknown ¶
func (m *Metadata) XXX_DiscardUnknown()
func (*Metadata) XXX_Marshal ¶
func (*Metadata) XXX_Unmarshal ¶
type NamingRequest ¶
type NamingRequest struct { *Request Namespace string `json:"namespace"` ServiceName string `json:"serviceName"` GroupName string `json:"groupName"` Module string `json:"module"` }
NamingRequest
func NewBasicNamingRequest ¶
func NewBasicNamingRequest(requestId, namespace, serviceName, groupName string) *NamingRequest
func (*NamingRequest) GetStringToSign ¶
func (r *NamingRequest) GetStringToSign() string
func (*NamingRequest) RequestMeta ¶
func (n *NamingRequest) RequestMeta() interface{}
type NotifySubscriberRequest ¶
type NotifySubscriberRequest struct { *NamingRequest ServiceInfo *model.ServiceInfo `json:"serviceInfo"` }
NotifySubscriberRequest
func NewNotifySubscriberRequest ¶
func NewNotifySubscriberRequest() *NotifySubscriberRequest
func (*NotifySubscriberRequest) GetRequestType ¶
func (r *NotifySubscriberRequest) GetRequestType() string
type NotifySubscriberResponse ¶
type NotifySubscriberResponse struct {
*Response
}
NotifySubscriberResponse
func (*NotifySubscriberResponse) GetResponseType ¶
func (c *NotifySubscriberResponse) GetResponseType() string
type Payload ¶
type Payload struct { Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` Body *anypb.Any `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Payload) Descriptor ¶
func (*Payload) GetMetadata ¶
func (*Payload) ProtoMessage ¶
func (*Payload) ProtoMessage()
func (*Payload) XXX_DiscardUnknown ¶
func (m *Payload) XXX_DiscardUnknown()
func (*Payload) XXX_Marshal ¶
func (*Payload) XXX_Unmarshal ¶
type PersistentInstanceRequest ¶
type PersistentInstanceRequest struct { *NamingRequest Type string `json:"type"` Instance model.Instance `json:"instance"` }
func NewPersistentInstanceRequest ¶
func NewPersistentInstanceRequest() *PersistentInstanceRequest
NewInstanceRequest
func (*PersistentInstanceRequest) GetRequestType ¶
func (r *PersistentInstanceRequest) GetRequestType() string
func (*PersistentInstanceRequest) RequestMeta ¶
func (n *PersistentInstanceRequest) RequestMeta() interface{}
type QueryServiceResponse ¶
QueryServiceResponse
func (*QueryServiceResponse) GetResponseType ¶
func (c *QueryServiceResponse) GetResponseType() string
type Request ¶
Request
func (*Request) ClearHeaders ¶
func (r *Request) ClearHeaders()
func (*Request) GetBody ¶
func (r *Request) GetBody(request BaseRequest) string
func (*Request) GetHeaders ¶
func (*Request) GetRequestId ¶
func (*Request) GetStringToSign ¶
func (*Request) PutAllHeaders ¶
type RequestClient ¶
type RequestClient interface { // Sends a commonRequest Request(ctx context.Context, in *Payload, opts ...grpc.CallOption) (*Payload, error) }
RequestClient is the client API for Request service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRequestClient ¶
func NewRequestClient(cc *grpc.ClientConn) RequestClient
type RequestMeta ¶
type RequestMeta struct { ConnectionID string ClientIP string ClientVersion string Labels map[string]string }
RequestMeta
type RequestServer ¶
type RequestServer interface { // Sends a commonRequest Request(context.Context, *Payload) (*Payload, error) }
RequestServer is the server API for Request service.
type Response ¶
type Response struct { ResultCode int `json:"resultCode"` ErrorCode int `json:"errorCode"` Success bool `json:"success"` Message string `json:"message"` RequestId string `json:"requestId"` }
Response
func (*Response) GetErrorCode ¶
func (*Response) GetMessage ¶
func (*Response) GetRequestId ¶
func (*Response) GetResultCode ¶
func (*Response) SetRequestId ¶
type ServerCheckRequest ¶
type ServerCheckRequest struct {
*InternalRequest
}
ServerCheckRequest
func NewServerCheckRequest ¶
func NewServerCheckRequest() *ServerCheckRequest
NewServerCheckRequest .
func (*ServerCheckRequest) GetRequestType ¶
func (r *ServerCheckRequest) GetRequestType() string
type ServerCheckResponse ¶
ServerCheckResponse
func NewServerCheckResponse ¶
func NewServerCheckResponse() *ServerCheckResponse
NewServerCheckResponse
func (*ServerCheckResponse) GetResponseType ¶
func (c *ServerCheckResponse) GetResponseType() string
type ServiceListRequest ¶
type ServiceListRequest struct { *NamingRequest PageNo int `json:"pageNo"` PageSize int `json:"pageSize"` Selector string `json:"selector"` }
ServiceListRequest
func NewServiceListRequest ¶
func NewServiceListRequest() *ServiceListRequest
NewServiceListRequest .
func (*ServiceListRequest) GetRequestType ¶
func (r *ServiceListRequest) GetRequestType() string
func (*ServiceListRequest) RequestMeta ¶
func (n *ServiceListRequest) RequestMeta() interface{}
type ServiceListResponse ¶
type ServiceListResponse struct { *Response Count int `json:"count"` ServiceNames []string `json:"serviceNames"` }
ServiceListResponse
func (*ServiceListResponse) GetResponseType ¶
func (c *ServiceListResponse) GetResponseType() string
type ServiceQueryRequest ¶
type ServiceQueryRequest struct { *NamingRequest Cluster string `json:"cluster"` HealthyOnly bool `json:"healthyOnly"` UdpPort int `json:"udpPort"` }
ServiceQueryRequest
func NewServiceQueryRequest ¶
func NewServiceQueryRequest() *ServiceQueryRequest
NewServiceQueryRequest .
func (*ServiceQueryRequest) GetRequestType ¶
func (r *ServiceQueryRequest) GetRequestType() string
func (*ServiceQueryRequest) RequestMeta ¶
func (n *ServiceQueryRequest) RequestMeta() interface{}
type SubscribeServiceRequest ¶
type SubscribeServiceRequest struct { *NamingRequest Subscribe bool `json:"subscribe"` Clusters string `json:"clusters"` }
SubscribeServiceRequest
func NewSubscribeServiceRequest ¶
func NewSubscribeServiceRequest() *SubscribeServiceRequest
NewSubscribeServiceRequest .
func (*SubscribeServiceRequest) GetRequestType ¶
func (r *SubscribeServiceRequest) GetRequestType() string
func (*SubscribeServiceRequest) RequestMeta ¶
func (n *SubscribeServiceRequest) RequestMeta() interface{}
type SubscribeServiceResponse ¶
type SubscribeServiceResponse struct { *Response ServiceInfo model.ServiceInfo `json:"serviceInfo"` }
SubscribeServiceResponse
func (*SubscribeServiceResponse) GetResponseType ¶
func (c *SubscribeServiceResponse) GetResponseType() string