Documentation
¶
Index ¶
- func RegisterSignalingServer(s *grpc.Server, srv SignalingServer)
- type ConfigJson
- func (*ConfigJson) Descriptor() ([]byte, []int)
- func (m *ConfigJson) GetDb() string
- func (m *ConfigJson) GetDbSlave() string
- func (m *ConfigJson) GetFields() string
- func (m *ConfigJson) GetInitFields() []string
- func (m *ConfigJson) GetPk() string
- func (m *ConfigJson) GetSource() string
- func (m *ConfigJson) GetTable() string
- func (m *ConfigJson) GetUuid() string
- func (*ConfigJson) ProtoMessage()
- func (m *ConfigJson) Reset()
- func (m *ConfigJson) String() string
- func (m *ConfigJson) XXX_DiscardUnknown()
- func (m *ConfigJson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConfigJson) XXX_Merge(src proto.Message)
- func (m *ConfigJson) XXX_Size() int
- func (m *ConfigJson) XXX_Unmarshal(b []byte) error
- type Configs
- func (*Configs) Descriptor() ([]byte, []int)
- func (m *Configs) GetConfigs() []byte
- func (*Configs) ProtoMessage()
- func (m *Configs) Reset()
- func (m *Configs) String() string
- func (m *Configs) XXX_DiscardUnknown()
- func (m *Configs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Configs) XXX_Merge(src proto.Message)
- func (m *Configs) XXX_Size() int
- func (m *Configs) XXX_Unmarshal(b []byte) error
- type Region
- func (*Region) Descriptor() ([]byte, []int)
- func (m *Region) GetRegion() string
- func (*Region) ProtoMessage()
- func (m *Region) Reset()
- func (m *Region) String() string
- func (m *Region) XXX_DiscardUnknown()
- func (m *Region) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Region) XXX_Merge(src proto.Message)
- func (m *Region) XXX_Size() int
- func (m *Region) XXX_Unmarshal(b []byte) error
- type SignalingClient
- type SignalingServer
- type Signaling_SyncToMasterClient
- type Signaling_SyncToMasterServer
- type Signaling_SyncToSlaveClient
- type Signaling_SyncToSlaveServer
- type SyncData
- func (*SyncData) Descriptor() ([]byte, []int)
- func (m *SyncData) GetConfigJson() *ConfigJson
- func (m *SyncData) GetConfigUuid() string
- func (m *SyncData) GetSource() string
- func (m *SyncData) GetSyncJson() string
- func (*SyncData) ProtoMessage()
- func (m *SyncData) Reset()
- func (m *SyncData) String() string
- func (m *SyncData) XXX_DiscardUnknown()
- func (m *SyncData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SyncData) XXX_Merge(src proto.Message)
- func (m *SyncData) XXX_Size() int
- func (m *SyncData) XXX_Unmarshal(b []byte) error
- type UnimplementedSignalingServer
- type UpdateVersions
- func (*UpdateVersions) Descriptor() ([]byte, []int)
- func (m *UpdateVersions) GetRegion() string
- func (m *UpdateVersions) GetVersion() []*Version
- func (*UpdateVersions) ProtoMessage()
- func (m *UpdateVersions) Reset()
- func (m *UpdateVersions) String() string
- func (m *UpdateVersions) XXX_DiscardUnknown()
- func (m *UpdateVersions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpdateVersions) XXX_Merge(src proto.Message)
- func (m *UpdateVersions) XXX_Size() int
- func (m *UpdateVersions) XXX_Unmarshal(b []byte) error
- type Version
- func (*Version) Descriptor() ([]byte, []int)
- func (m *Version) GetConfigUuid() string
- func (m *Version) GetOffset() string
- func (*Version) ProtoMessage()
- func (m *Version) Reset()
- func (m *Version) String() string
- func (m *Version) XXX_DiscardUnknown()
- func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Version) XXX_Merge(src proto.Message)
- func (m *Version) XXX_Size() int
- func (m *Version) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSignalingServer ¶
func RegisterSignalingServer(s *grpc.Server, srv SignalingServer)
Types ¶
type ConfigJson ¶
type ConfigJson struct { Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"` DbSlave string `protobuf:"bytes,2,opt,name=db_slave,json=dbSlave,proto3" json:"db_slave,omitempty"` Table string `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` Fields string `protobuf:"bytes,4,opt,name=fields,proto3" json:"fields,omitempty"` Pk string `protobuf:"bytes,5,opt,name=pk,proto3" json:"pk,omitempty"` Uuid string `protobuf:"bytes,6,opt,name=uuid,proto3" json:"uuid,omitempty"` Source string `protobuf:"bytes,7,opt,name=source,proto3" json:"source,omitempty"` InitFields []string `protobuf:"bytes,8,rep,name=init_fields,json=initFields,proto3" json:"init_fields,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ConfigJson) Descriptor ¶
func (*ConfigJson) Descriptor() ([]byte, []int)
func (*ConfigJson) GetDb ¶
func (m *ConfigJson) GetDb() string
func (*ConfigJson) GetDbSlave ¶
func (m *ConfigJson) GetDbSlave() string
func (*ConfigJson) GetFields ¶
func (m *ConfigJson) GetFields() string
func (*ConfigJson) GetInitFields ¶
func (m *ConfigJson) GetInitFields() []string
func (*ConfigJson) GetPk ¶
func (m *ConfigJson) GetPk() string
func (*ConfigJson) GetSource ¶
func (m *ConfigJson) GetSource() string
func (*ConfigJson) GetTable ¶
func (m *ConfigJson) GetTable() string
func (*ConfigJson) GetUuid ¶
func (m *ConfigJson) GetUuid() string
func (*ConfigJson) ProtoMessage ¶
func (*ConfigJson) ProtoMessage()
func (*ConfigJson) Reset ¶
func (m *ConfigJson) Reset()
func (*ConfigJson) String ¶
func (m *ConfigJson) String() string
func (*ConfigJson) XXX_DiscardUnknown ¶
func (m *ConfigJson) XXX_DiscardUnknown()
func (*ConfigJson) XXX_Marshal ¶
func (m *ConfigJson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConfigJson) XXX_Merge ¶
func (m *ConfigJson) XXX_Merge(src proto.Message)
func (*ConfigJson) XXX_Size ¶
func (m *ConfigJson) XXX_Size() int
func (*ConfigJson) XXX_Unmarshal ¶
func (m *ConfigJson) XXX_Unmarshal(b []byte) error
type Configs ¶
type Configs struct { Configs []byte `protobuf:"bytes,1,opt,name=configs,proto3" json:"configs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
UpdateConfigsCache远程调用专用
func (*Configs) Descriptor ¶
func (*Configs) GetConfigs ¶
func (*Configs) ProtoMessage ¶
func (*Configs) ProtoMessage()
func (*Configs) XXX_DiscardUnknown ¶
func (m *Configs) XXX_DiscardUnknown()
func (*Configs) XXX_Marshal ¶
func (*Configs) XXX_Unmarshal ¶
type Region ¶
type Region struct { Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
UpdateConfigsCache远程调用专用
func (*Region) Descriptor ¶
func (*Region) ProtoMessage ¶
func (*Region) ProtoMessage()
func (*Region) XXX_DiscardUnknown ¶
func (m *Region) XXX_DiscardUnknown()
func (*Region) XXX_Marshal ¶
func (*Region) XXX_Unmarshal ¶
type SignalingClient ¶
type SignalingClient interface { //从master同步到slave // 注意这里的stream可不是什么变量名,而是protobuf的一个关键词,用于定义流式请求或流式响应 // 放在返回值上,表示流式响应;放在参数上,表示流式请求 SyncToSlave(ctx context.Context, opts ...grpc.CallOption) (Signaling_SyncToSlaveClient, error) //从slave同步到master // 注意这里的stream可不是什么变量名,而是protobuf的一个关键词,用于定义流式请求或流式响应 SyncToMaster(ctx context.Context, opts ...grpc.CallOption) (Signaling_SyncToMasterClient, error) //从master更新本地config缓存 UpdateConfigsCache(ctx context.Context, in *Region, opts ...grpc.CallOption) (*Configs, error) }
SignalingClient is the client API for Signaling service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSignalingClient ¶
func NewSignalingClient(cc *grpc.ClientConn) SignalingClient
type SignalingServer ¶
type SignalingServer interface { //从master同步到slave // 注意这里的stream可不是什么变量名,而是protobuf的一个关键词,用于定义流式请求或流式响应 // 放在返回值上,表示流式响应;放在参数上,表示流式请求 SyncToSlave(Signaling_SyncToSlaveServer) error //从slave同步到master // 注意这里的stream可不是什么变量名,而是protobuf的一个关键词,用于定义流式请求或流式响应 SyncToMaster(Signaling_SyncToMasterServer) error //从master更新本地config缓存 UpdateConfigsCache(context.Context, *Region) (*Configs, error) }
SignalingServer is the server API for Signaling service.
type Signaling_SyncToMasterClient ¶
type Signaling_SyncToMasterClient interface { Send(*SyncData) error Recv() (*UpdateVersions, error) grpc.ClientStream }
type Signaling_SyncToMasterServer ¶
type Signaling_SyncToMasterServer interface { Send(*UpdateVersions) error Recv() (*SyncData, error) grpc.ServerStream }
type Signaling_SyncToSlaveClient ¶
type Signaling_SyncToSlaveClient interface { Send(*UpdateVersions) error Recv() (*SyncData, error) grpc.ClientStream }
type Signaling_SyncToSlaveServer ¶
type Signaling_SyncToSlaveServer interface { Send(*SyncData) error Recv() (*UpdateVersions, error) grpc.ServerStream }
type SyncData ¶
type SyncData struct { ConfigUuid string `protobuf:"bytes,1,opt,name=config_uuid,json=configUuid,proto3" json:"config_uuid,omitempty"` ConfigJson *ConfigJson `protobuf:"bytes,2,opt,name=configJson,proto3" json:"configJson,omitempty"` SyncJson string `protobuf:"bytes,3,opt,name=sync_json,json=syncJson,proto3" json:"sync_json,omitempty"` Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SyncData) Descriptor ¶
func (*SyncData) GetConfigJson ¶
func (m *SyncData) GetConfigJson() *ConfigJson
func (*SyncData) GetConfigUuid ¶
func (*SyncData) GetSyncJson ¶
func (*SyncData) ProtoMessage ¶
func (*SyncData) ProtoMessage()
func (*SyncData) XXX_DiscardUnknown ¶
func (m *SyncData) XXX_DiscardUnknown()
func (*SyncData) XXX_Marshal ¶
func (*SyncData) XXX_Unmarshal ¶
type UnimplementedSignalingServer ¶
type UnimplementedSignalingServer struct { }
UnimplementedSignalingServer can be embedded to have forward compatible implementations.
func (*UnimplementedSignalingServer) SyncToMaster ¶
func (*UnimplementedSignalingServer) SyncToMaster(srv Signaling_SyncToMasterServer) error
func (*UnimplementedSignalingServer) SyncToSlave ¶
func (*UnimplementedSignalingServer) SyncToSlave(srv Signaling_SyncToSlaveServer) error
func (*UnimplementedSignalingServer) UpdateConfigsCache ¶
type UpdateVersions ¶
type UpdateVersions struct { Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` Version []*Version `protobuf:"bytes,2,rep,name=version,proto3" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UpdateVersions) Descriptor ¶
func (*UpdateVersions) Descriptor() ([]byte, []int)
func (*UpdateVersions) GetRegion ¶
func (m *UpdateVersions) GetRegion() string
func (*UpdateVersions) GetVersion ¶
func (m *UpdateVersions) GetVersion() []*Version
func (*UpdateVersions) ProtoMessage ¶
func (*UpdateVersions) ProtoMessage()
func (*UpdateVersions) Reset ¶
func (m *UpdateVersions) Reset()
func (*UpdateVersions) String ¶
func (m *UpdateVersions) String() string
func (*UpdateVersions) XXX_DiscardUnknown ¶
func (m *UpdateVersions) XXX_DiscardUnknown()
func (*UpdateVersions) XXX_Marshal ¶
func (m *UpdateVersions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateVersions) XXX_Merge ¶
func (m *UpdateVersions) XXX_Merge(src proto.Message)
func (*UpdateVersions) XXX_Size ¶
func (m *UpdateVersions) XXX_Size() int
func (*UpdateVersions) XXX_Unmarshal ¶
func (m *UpdateVersions) XXX_Unmarshal(b []byte) error
type Version ¶
type Version struct { ConfigUuid string `protobuf:"bytes,1,opt,name=configUuid,proto3" json:"configUuid,omitempty"` Offset string `protobuf:"bytes,2,opt,name=offset,proto3" json:"offset,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Version) Descriptor ¶
func (*Version) GetConfigUuid ¶
func (*Version) ProtoMessage ¶
func (*Version) ProtoMessage()
func (*Version) XXX_DiscardUnknown ¶
func (m *Version) XXX_DiscardUnknown()
func (*Version) XXX_Marshal ¶
func (*Version) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.