proto

package
v0.0.0-...-b0c7fd6 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "HEALTHY",
		1: "UNHEALTHY",
		2: "LEFT",
	}
	Status_value = map[string]int32{
		"HEALTHY":   0,
		"UNHEALTHY": 1,
		"LEFT":      2,
	}
)

Enum value maps for Status.

View Source
var File_membership_proto_membership_proto protoreflect.FileDescriptor
View Source
var Membership_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "membership.Membership",
	HandlerType: (*MembershipServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListNodes",
			Handler:    _Membership_ListNodes_Handler,
		},
		{
			MethodName: "Ping",
			Handler:    _Membership_Ping_Handler,
		},
		{
			MethodName: "PullPushState",
			Handler:    _Membership_PullPushState_Handler,
		},
		{
			MethodName: "PingIndirect",
			Handler:    _Membership_PingIndirect_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "membership/proto/membership.proto",
}

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

Functions

func RegisterMembershipServer

func RegisterMembershipServer(s grpc.ServiceRegistrar, srv MembershipServer)

Types

type ListNodesRequest

type ListNodesRequest struct {
	// contains filtered or unexported fields
}

func (*ListNodesRequest) Descriptor deprecated

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

Deprecated: Use ListNodesRequest.ProtoReflect.Descriptor instead.

func (*ListNodesRequest) ProtoMessage

func (*ListNodesRequest) ProtoMessage()

func (*ListNodesRequest) ProtoReflect

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

func (*ListNodesRequest) Reset

func (x *ListNodesRequest) Reset()

func (*ListNodesRequest) String

func (x *ListNodesRequest) String() string

type ListNodesResponse

type ListNodesResponse struct {
	Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
	// contains filtered or unexported fields
}

func (*ListNodesResponse) Descriptor deprecated

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

Deprecated: Use ListNodesResponse.ProtoReflect.Descriptor instead.

func (*ListNodesResponse) GetNodes

func (x *ListNodesResponse) GetNodes() []*Node

func (*ListNodesResponse) ProtoMessage

func (*ListNodesResponse) ProtoMessage()

func (*ListNodesResponse) ProtoReflect

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

func (*ListNodesResponse) Reset

func (x *ListNodesResponse) Reset()

func (*ListNodesResponse) String

func (x *ListNodesResponse) String() string

type MembershipClient

type MembershipClient interface {
	ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error)
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
	PullPushState(ctx context.Context, in *PullPushStateRequest, opts ...grpc.CallOption) (*PullPushStateResponse, error)
	PingIndirect(ctx context.Context, in *PingIndirectRequest, opts ...grpc.CallOption) (*PingIndirectResponse, error)
}

MembershipClient is the client API for Membership 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 NewMembershipClient

func NewMembershipClient(cc grpc.ClientConnInterface) MembershipClient

type MembershipServer

type MembershipServer interface {
	ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error)
	Ping(context.Context, *PingRequest) (*PingResponse, error)
	PullPushState(context.Context, *PullPushStateRequest) (*PullPushStateResponse, error)
	PingIndirect(context.Context, *PingIndirectRequest) (*PingIndirectResponse, error)
	// contains filtered or unexported methods
}

MembershipServer is the server API for Membership service. All implementations must embed UnimplementedMembershipServer for forward compatibility

type Node

type Node struct {
	Id         uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name       string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Address    string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	Generation uint32 `protobuf:"varint,4,opt,name=generation,proto3" json:"generation,omitempty"`
	Status     Status `protobuf:"varint,5,opt,name=status,proto3,enum=membership.Status" json:"status,omitempty"`
	Error      string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"`
	RunId      int64  `protobuf:"varint,7,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetAddress

func (x *Node) GetAddress() string

func (*Node) GetError

func (x *Node) GetError() string

func (*Node) GetGeneration

func (x *Node) GetGeneration() uint32

func (*Node) GetId

func (x *Node) GetId() uint32

func (*Node) GetName

func (x *Node) GetName() string

func (*Node) GetRunId

func (x *Node) GetRunId() int64

func (*Node) GetStatus

func (x *Node) GetStatus() Status

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type PingIndirectRequest

type PingIndirectRequest struct {
	NodeId  uint32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	Timeout int64  `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*PingIndirectRequest) Descriptor deprecated

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

Deprecated: Use PingIndirectRequest.ProtoReflect.Descriptor instead.

func (*PingIndirectRequest) GetNodeId

func (x *PingIndirectRequest) GetNodeId() uint32

func (*PingIndirectRequest) GetTimeout

func (x *PingIndirectRequest) GetTimeout() int64

func (*PingIndirectRequest) ProtoMessage

func (*PingIndirectRequest) ProtoMessage()

func (*PingIndirectRequest) ProtoReflect

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

func (*PingIndirectRequest) Reset

func (x *PingIndirectRequest) Reset()

func (*PingIndirectRequest) String

func (x *PingIndirectRequest) String() string

type PingIndirectResponse

type PingIndirectResponse struct {
	Duration int64  `protobuf:"varint,1,opt,name=duration,proto3" json:"duration,omitempty"`
	Status   Status `protobuf:"varint,2,opt,name=status,proto3,enum=membership.Status" json:"status,omitempty"`
	Message  string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*PingIndirectResponse) Descriptor deprecated

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

Deprecated: Use PingIndirectResponse.ProtoReflect.Descriptor instead.

func (*PingIndirectResponse) GetDuration

func (x *PingIndirectResponse) GetDuration() int64

func (*PingIndirectResponse) GetMessage

func (x *PingIndirectResponse) GetMessage() string

func (*PingIndirectResponse) GetStatus

func (x *PingIndirectResponse) GetStatus() Status

func (*PingIndirectResponse) ProtoMessage

func (*PingIndirectResponse) ProtoMessage()

func (*PingIndirectResponse) ProtoReflect

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

func (*PingIndirectResponse) Reset

func (x *PingIndirectResponse) Reset()

func (*PingIndirectResponse) String

func (x *PingIndirectResponse) String() string

type PingRequest

type PingRequest struct {
	// contains filtered or unexported fields
}

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

type PingResponse

type PingResponse struct {
	StateHash uint64 `protobuf:"varint,1,opt,name=state_hash,json=stateHash,proto3" json:"state_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*PingResponse) Descriptor deprecated

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

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) GetStateHash

func (x *PingResponse) GetStateHash() uint64

func (*PingResponse) ProtoMessage

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect

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

func (*PingResponse) Reset

func (x *PingResponse) Reset()

func (*PingResponse) String

func (x *PingResponse) String() string

type PullPushStateRequest

type PullPushStateRequest struct {
	NodeId uint32  `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	Nodes  []*Node `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
	// contains filtered or unexported fields
}

func (*PullPushStateRequest) Descriptor deprecated

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

Deprecated: Use PullPushStateRequest.ProtoReflect.Descriptor instead.

func (*PullPushStateRequest) GetNodeId

func (x *PullPushStateRequest) GetNodeId() uint32

func (*PullPushStateRequest) GetNodes

func (x *PullPushStateRequest) GetNodes() []*Node

func (*PullPushStateRequest) ProtoMessage

func (*PullPushStateRequest) ProtoMessage()

func (*PullPushStateRequest) ProtoReflect

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

func (*PullPushStateRequest) Reset

func (x *PullPushStateRequest) Reset()

func (*PullPushStateRequest) String

func (x *PullPushStateRequest) String() string

type PullPushStateResponse

type PullPushStateResponse struct {
	Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
	// contains filtered or unexported fields
}

func (*PullPushStateResponse) Descriptor deprecated

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

Deprecated: Use PullPushStateResponse.ProtoReflect.Descriptor instead.

func (*PullPushStateResponse) GetNodes

func (x *PullPushStateResponse) GetNodes() []*Node

func (*PullPushStateResponse) ProtoMessage

func (*PullPushStateResponse) ProtoMessage()

func (*PullPushStateResponse) ProtoReflect

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

func (*PullPushStateResponse) Reset

func (x *PullPushStateResponse) Reset()

func (*PullPushStateResponse) String

func (x *PullPushStateResponse) String() string

type Status

type Status int32
const (
	Status_HEALTHY   Status = 0
	Status_UNHEALTHY Status = 1
	Status_LEFT      Status = 2
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type UnimplementedMembershipServer

type UnimplementedMembershipServer struct {
}

UnimplementedMembershipServer must be embedded to have forward compatible implementations.

func (UnimplementedMembershipServer) ListNodes

func (UnimplementedMembershipServer) Ping

func (UnimplementedMembershipServer) PingIndirect

func (UnimplementedMembershipServer) PullPushState

type UnsafeMembershipServer

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

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

Jump to

Keyboard shortcuts

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