slave

package
v0.0.0-...-115e584 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Configs) GetConfigs

func (m *Configs) GetConfigs() []byte

func (*Configs) ProtoMessage

func (*Configs) ProtoMessage()

func (*Configs) Reset

func (m *Configs) Reset()

func (*Configs) String

func (m *Configs) String() string

func (*Configs) XXX_DiscardUnknown

func (m *Configs) XXX_DiscardUnknown()

func (*Configs) XXX_Marshal

func (m *Configs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Configs) XXX_Merge

func (m *Configs) XXX_Merge(src proto.Message)

func (*Configs) XXX_Size

func (m *Configs) XXX_Size() int

func (*Configs) XXX_Unmarshal

func (m *Configs) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Region) GetRegion

func (m *Region) GetRegion() string

func (*Region) ProtoMessage

func (*Region) ProtoMessage()

func (*Region) Reset

func (m *Region) Reset()

func (*Region) String

func (m *Region) String() string

func (*Region) XXX_DiscardUnknown

func (m *Region) XXX_DiscardUnknown()

func (*Region) XXX_Marshal

func (m *Region) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Region) XXX_Merge

func (m *Region) XXX_Merge(src proto.Message)

func (*Region) XXX_Size

func (m *Region) XXX_Size() int

func (*Region) XXX_Unmarshal

func (m *Region) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*SyncData) GetConfigJson

func (m *SyncData) GetConfigJson() *ConfigJson

func (*SyncData) GetConfigUuid

func (m *SyncData) GetConfigUuid() string

func (*SyncData) GetSource

func (m *SyncData) GetSource() string

func (*SyncData) GetSyncJson

func (m *SyncData) GetSyncJson() string

func (*SyncData) ProtoMessage

func (*SyncData) ProtoMessage()

func (*SyncData) Reset

func (m *SyncData) Reset()

func (*SyncData) String

func (m *SyncData) String() string

func (*SyncData) XXX_DiscardUnknown

func (m *SyncData) XXX_DiscardUnknown()

func (*SyncData) XXX_Marshal

func (m *SyncData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SyncData) XXX_Merge

func (m *SyncData) XXX_Merge(src proto.Message)

func (*SyncData) XXX_Size

func (m *SyncData) XXX_Size() int

func (*SyncData) XXX_Unmarshal

func (m *SyncData) XXX_Unmarshal(b []byte) error

type UnimplementedSignalingServer

type UnimplementedSignalingServer struct {
}

UnimplementedSignalingServer can be embedded to have forward compatible implementations.

func (*UnimplementedSignalingServer) SyncToMaster

func (*UnimplementedSignalingServer) SyncToSlave

func (*UnimplementedSignalingServer) UpdateConfigsCache

func (*UnimplementedSignalingServer) UpdateConfigsCache(ctx context.Context, req *Region) (*Configs, error)

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) Descriptor() ([]byte, []int)

func (*Version) GetConfigUuid

func (m *Version) GetConfigUuid() string

func (*Version) GetOffset

func (m *Version) GetOffset() string

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) Reset

func (m *Version) Reset()

func (*Version) String

func (m *Version) String() string

func (*Version) XXX_DiscardUnknown

func (m *Version) XXX_DiscardUnknown()

func (*Version) XXX_Marshal

func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Version) XXX_Merge

func (m *Version) XXX_Merge(src proto.Message)

func (*Version) XXX_Size

func (m *Version) XXX_Size() int

func (*Version) XXX_Unmarshal

func (m *Version) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL