gossip

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MemberInfo_VNodeState_name = map[int32]string{
		0:  "Initializing",
		1:  "DiscoverLeader",
		2:  "Unknown",
		3:  "PreReplica",
		4:  "CatchingUp",
		5:  "Clone",
		6:  "Follower",
		7:  "PreLeader",
		8:  "Leader",
		9:  "Manager",
		10: "ShuttingDown",
		11: "Shutdown",
		12: "ReadOnlyLeaderless",
		13: "PreReadOnlyReplica",
		14: "ReadOnlyReplica",
		15: "ResigningLeader",
	}
	MemberInfo_VNodeState_value = map[string]int32{
		"Initializing":       0,
		"DiscoverLeader":     1,
		"Unknown":            2,
		"PreReplica":         3,
		"CatchingUp":         4,
		"Clone":              5,
		"Follower":           6,
		"PreLeader":          7,
		"Leader":             8,
		"Manager":            9,
		"ShuttingDown":       10,
		"Shutdown":           11,
		"ReadOnlyLeaderless": 12,
		"PreReadOnlyReplica": 13,
		"ReadOnlyReplica":    14,
		"ResigningLeader":    15,
	}
)

Enum value maps for MemberInfo_VNodeState.

View Source
var File_gossip_proto protoreflect.FileDescriptor
View Source
var Gossip_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "event_store.client.gossip.Gossip",
	HandlerType: (*GossipServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Read",
			Handler:    _Gossip_Read_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gossip.proto",
}

Gossip_ServiceDesc is the grpc.ServiceDesc for Gossip service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterGossipServer

func RegisterGossipServer(s grpc.ServiceRegistrar, srv GossipServer)

Types

type ClusterInfo

type ClusterInfo struct {
	Members []*MemberInfo `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"`
	// contains filtered or unexported fields
}

func (*ClusterInfo) Descriptor deprecated

func (*ClusterInfo) Descriptor() ([]byte, []int)

Deprecated: Use ClusterInfo.ProtoReflect.Descriptor instead.

func (*ClusterInfo) GetMembers

func (x *ClusterInfo) GetMembers() []*MemberInfo

func (*ClusterInfo) ProtoMessage

func (*ClusterInfo) ProtoMessage()

func (*ClusterInfo) ProtoReflect

func (x *ClusterInfo) ProtoReflect() protoreflect.Message

func (*ClusterInfo) Reset

func (x *ClusterInfo) Reset()

func (*ClusterInfo) String

func (x *ClusterInfo) String() string

type EndPoint

type EndPoint struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Port    uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*EndPoint) Descriptor deprecated

func (*EndPoint) Descriptor() ([]byte, []int)

Deprecated: Use EndPoint.ProtoReflect.Descriptor instead.

func (*EndPoint) GetAddress

func (x *EndPoint) GetAddress() string

func (*EndPoint) GetPort

func (x *EndPoint) GetPort() uint32

func (*EndPoint) ProtoMessage

func (*EndPoint) ProtoMessage()

func (*EndPoint) ProtoReflect

func (x *EndPoint) ProtoReflect() protoreflect.Message

func (*EndPoint) Reset

func (x *EndPoint) Reset()

func (*EndPoint) String

func (x *EndPoint) String() string

type GossipClient

type GossipClient interface {
	Read(ctx context.Context, in *shared.Empty, opts ...grpc.CallOption) (*ClusterInfo, error)
}

GossipClient is the client API for Gossip service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewGossipClient

func NewGossipClient(cc grpc.ClientConnInterface) GossipClient

type GossipServer

type GossipServer interface {
	Read(context.Context, *shared.Empty) (*ClusterInfo, error)
	// contains filtered or unexported methods
}

GossipServer is the server API for Gossip service. All implementations must embed UnimplementedGossipServer for forward compatibility

type MemberInfo

type MemberInfo struct {
	InstanceId   *shared.UUID          `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
	TimeStamp    int64                 `protobuf:"varint,2,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"`
	State        MemberInfo_VNodeState `protobuf:"varint,3,opt,name=state,proto3,enum=event_store.client.gossip.MemberInfo_VNodeState" json:"state,omitempty"`
	IsAlive      bool                  `protobuf:"varint,4,opt,name=is_alive,json=isAlive,proto3" json:"is_alive,omitempty"`
	HttpEndPoint *EndPoint             `protobuf:"bytes,5,opt,name=http_end_point,json=httpEndPoint,proto3" json:"http_end_point,omitempty"`
	// contains filtered or unexported fields
}

func (*MemberInfo) Descriptor deprecated

func (*MemberInfo) Descriptor() ([]byte, []int)

Deprecated: Use MemberInfo.ProtoReflect.Descriptor instead.

func (*MemberInfo) GetHttpEndPoint

func (x *MemberInfo) GetHttpEndPoint() *EndPoint

func (*MemberInfo) GetInstanceId

func (x *MemberInfo) GetInstanceId() *shared.UUID

func (*MemberInfo) GetIsAlive

func (x *MemberInfo) GetIsAlive() bool

func (*MemberInfo) GetState

func (x *MemberInfo) GetState() MemberInfo_VNodeState

func (*MemberInfo) GetTimeStamp

func (x *MemberInfo) GetTimeStamp() int64

func (*MemberInfo) ProtoMessage

func (*MemberInfo) ProtoMessage()

func (*MemberInfo) ProtoReflect

func (x *MemberInfo) ProtoReflect() protoreflect.Message

func (*MemberInfo) Reset

func (x *MemberInfo) Reset()

func (*MemberInfo) String

func (x *MemberInfo) String() string

type MemberInfo_VNodeState

type MemberInfo_VNodeState int32
const (
	MemberInfo_Initializing       MemberInfo_VNodeState = 0
	MemberInfo_DiscoverLeader     MemberInfo_VNodeState = 1
	MemberInfo_Unknown            MemberInfo_VNodeState = 2
	MemberInfo_PreReplica         MemberInfo_VNodeState = 3
	MemberInfo_CatchingUp         MemberInfo_VNodeState = 4
	MemberInfo_Clone              MemberInfo_VNodeState = 5
	MemberInfo_Follower           MemberInfo_VNodeState = 6
	MemberInfo_PreLeader          MemberInfo_VNodeState = 7
	MemberInfo_Leader             MemberInfo_VNodeState = 8
	MemberInfo_Manager            MemberInfo_VNodeState = 9
	MemberInfo_ShuttingDown       MemberInfo_VNodeState = 10
	MemberInfo_Shutdown           MemberInfo_VNodeState = 11
	MemberInfo_ReadOnlyLeaderless MemberInfo_VNodeState = 12
	MemberInfo_PreReadOnlyReplica MemberInfo_VNodeState = 13
	MemberInfo_ReadOnlyReplica    MemberInfo_VNodeState = 14
	MemberInfo_ResigningLeader    MemberInfo_VNodeState = 15
)

func (MemberInfo_VNodeState) Descriptor

func (MemberInfo_VNodeState) Enum

func (MemberInfo_VNodeState) EnumDescriptor deprecated

func (MemberInfo_VNodeState) EnumDescriptor() ([]byte, []int)

Deprecated: Use MemberInfo_VNodeState.Descriptor instead.

func (MemberInfo_VNodeState) Number

func (MemberInfo_VNodeState) String

func (x MemberInfo_VNodeState) String() string

func (MemberInfo_VNodeState) Type

type UnimplementedGossipServer

type UnimplementedGossipServer struct {
}

UnimplementedGossipServer must be embedded to have forward compatible implementations.

func (UnimplementedGossipServer) Read

type UnsafeGossipServer

type UnsafeGossipServer interface {
	// contains filtered or unexported methods
}

UnsafeGossipServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GossipServer will result in compilation errors.

Jump to

Keyboard shortcuts

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