proto

package
v0.0.0-...-b6e1e37 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HealthCheckResponse_ServingStatus_name = map[int32]string{
		0: "UNKNOWN",
		1: "SERVING",
		2: "NOT_SERVING",
		3: "SERVICE_UNKNOWN",
	}
	HealthCheckResponse_ServingStatus_value = map[string]int32{
		"UNKNOWN":         0,
		"SERVING":         1,
		"NOT_SERVING":     2,
		"SERVICE_UNKNOWN": 3,
	}
)

Enum value maps for HealthCheckResponse_ServingStatus.

View Source
var (
	Mutation_name = map[int32]string{
		0: "ASSIGN",
		1: "INSERT",
		2: "DELETE",
	}
	Mutation_value = map[string]int32{
		"ASSIGN": 0,
		"INSERT": 1,
		"DELETE": 2,
	}
)

Enum value maps for Mutation.

View Source
var DiscoveryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "swarm.DiscoveryService",
	HandlerType: (*DiscoveryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Init",
			Handler:    _DiscoveryService_Init_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _DiscoveryService_Watch_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/discoveryservice.proto",
}

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

View Source
var File_proto_discoveryservice_proto protoreflect.FileDescriptor
View Source
var File_proto_healthservice_proto protoreflect.FileDescriptor
View Source
var File_proto_operationservice_proto protoreflect.FileDescriptor
View Source
var HealthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "health.HealthService",
	HandlerType: (*HealthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Check",
			Handler:    _HealthService_Check_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _HealthService_Watch_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/healthservice.proto",
}

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

View Source
var OperationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "operations.OperationService",
	HandlerType: (*OperationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Receive",
			Handler:    _OperationService_Receive_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _OperationService_Watch_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/operationservice.proto",
}

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

Functions

func RegisterDiscoveryServiceServer

func RegisterDiscoveryServiceServer(s grpc.ServiceRegistrar, srv DiscoveryServiceServer)

func RegisterHealthServiceServer

func RegisterHealthServiceServer(s grpc.ServiceRegistrar, srv HealthServiceServer)

func RegisterOperationServiceServer

func RegisterOperationServiceServer(s grpc.ServiceRegistrar, srv OperationServiceServer)

Types

type DiscoveryServiceClient

type DiscoveryServiceClient interface {
	// Receive all peers info
	Init(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InitResponse, error)
	// Watch on latest peers! - Start with one node
	// --- eventually it will form a network.
	Watch(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (DiscoveryService_WatchClient, error)
}

DiscoveryServiceClient is the client API for DiscoveryService 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.

type DiscoveryServiceServer

type DiscoveryServiceServer interface {
	// Receive all peers info
	Init(context.Context, *emptypb.Empty) (*InitResponse, error)
	// Watch on latest peers! - Start with one node
	// --- eventually it will form a network.
	Watch(*emptypb.Empty, DiscoveryService_WatchServer) error
	// contains filtered or unexported methods
}

DiscoveryServiceServer is the server API for DiscoveryService service. All implementations must embed UnimplementedDiscoveryServiceServer for forward compatibility

type DiscoveryService_WatchClient

type DiscoveryService_WatchClient interface {
	Recv() (*PeerInfo, error)
	grpc.ClientStream
}

type DiscoveryService_WatchServer

type DiscoveryService_WatchServer interface {
	Send(*PeerInfo) error
	grpc.ServerStream
}

type HealthCheckRequest

type HealthCheckRequest struct {
	Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthCheckRequest) Descriptor deprecated

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

Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.

func (*HealthCheckRequest) GetService

func (x *HealthCheckRequest) GetService() string

func (*HealthCheckRequest) ProtoMessage

func (*HealthCheckRequest) ProtoMessage()

func (*HealthCheckRequest) ProtoReflect

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

func (*HealthCheckRequest) Reset

func (x *HealthCheckRequest) Reset()

func (*HealthCheckRequest) String

func (x *HealthCheckRequest) String() string

type HealthCheckResponse

type HealthCheckResponse struct {
	Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=health.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthCheckResponse) Descriptor deprecated

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

Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.

func (*HealthCheckResponse) GetStatus

func (*HealthCheckResponse) ProtoMessage

func (*HealthCheckResponse) ProtoMessage()

func (*HealthCheckResponse) ProtoReflect

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

func (*HealthCheckResponse) Reset

func (x *HealthCheckResponse) Reset()

func (*HealthCheckResponse) String

func (x *HealthCheckResponse) String() string

type HealthCheckResponse_ServingStatus

type HealthCheckResponse_ServingStatus int32
const (
	HealthCheckResponse_UNKNOWN         HealthCheckResponse_ServingStatus = 0
	HealthCheckResponse_SERVING         HealthCheckResponse_ServingStatus = 1
	HealthCheckResponse_NOT_SERVING     HealthCheckResponse_ServingStatus = 2
	HealthCheckResponse_SERVICE_UNKNOWN HealthCheckResponse_ServingStatus = 3 // Used only by the Watch method.
)

func (HealthCheckResponse_ServingStatus) Descriptor

func (HealthCheckResponse_ServingStatus) Enum

func (HealthCheckResponse_ServingStatus) EnumDescriptor deprecated

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

Deprecated: Use HealthCheckResponse_ServingStatus.Descriptor instead.

func (HealthCheckResponse_ServingStatus) Number

func (HealthCheckResponse_ServingStatus) String

func (HealthCheckResponse_ServingStatus) Type

type HealthServiceClient

type HealthServiceClient interface {
	Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
	Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (HealthService_WatchClient, error)
}

HealthServiceClient is the client API for HealthService 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.

type HealthServiceServer

type HealthServiceServer interface {
	Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
	Watch(*HealthCheckRequest, HealthService_WatchServer) error
	// contains filtered or unexported methods
}

HealthServiceServer is the server API for HealthService service. All implementations must embed UnimplementedHealthServiceServer for forward compatibility

type HealthService_WatchClient

type HealthService_WatchClient interface {
	Recv() (*HealthCheckResponse, error)
	grpc.ClientStream
}

type HealthService_WatchServer

type HealthService_WatchServer interface {
	Send(*HealthCheckResponse) error
	grpc.ServerStream
}

type InitResponse

type InitResponse struct {
	Peers []*PeerInfo `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	// contains filtered or unexported fields
}

func (*InitResponse) Descriptor deprecated

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

Deprecated: Use InitResponse.ProtoReflect.Descriptor instead.

func (*InitResponse) GetPeers

func (x *InitResponse) GetPeers() []*PeerInfo

func (*InitResponse) ProtoMessage

func (*InitResponse) ProtoMessage()

func (*InitResponse) ProtoReflect

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

func (*InitResponse) Reset

func (x *InitResponse) Reset()

func (*InitResponse) String

func (x *InitResponse) String() string

type Mutation

type Mutation int32
const (
	Mutation_ASSIGN Mutation = 0
	Mutation_INSERT Mutation = 1
	Mutation_DELETE Mutation = 2
)

func (Mutation) Descriptor

func (Mutation) Descriptor() protoreflect.EnumDescriptor

func (Mutation) Enum

func (x Mutation) Enum() *Mutation

func (Mutation) EnumDescriptor deprecated

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

Deprecated: Use Mutation.Descriptor instead.

func (Mutation) Number

func (x Mutation) Number() protoreflect.EnumNumber

func (Mutation) String

func (x Mutation) String() string

func (Mutation) Type

type Operation

type Operation struct {

	// Node info
	OperationId *Operation_Id `protobuf:"bytes,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
	// Dependency array
	Dependencies []*Operation_Id `protobuf:"bytes,2,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
	// JsonPath cursor
	Cursor string `protobuf:"bytes,3,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// Type of Operation
	Mutation Mutation `protobuf:"varint,4,opt,name=mutation,proto3,enum=operations.Mutation" json:"mutation,omitempty"`
	// contains filtered or unexported fields
}

func (*Operation) Descriptor deprecated

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

Deprecated: Use Operation.ProtoReflect.Descriptor instead.

func (*Operation) GetCursor

func (x *Operation) GetCursor() string

func (*Operation) GetDependencies

func (x *Operation) GetDependencies() []*Operation_Id

func (*Operation) GetMutation

func (x *Operation) GetMutation() Mutation

func (*Operation) GetOperationId

func (x *Operation) GetOperationId() *Operation_Id

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) ProtoReflect

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

func (*Operation) Reset

func (x *Operation) Reset()

func (*Operation) String

func (x *Operation) String() string

type OperationServiceClient

type OperationServiceClient interface {
	// Unary RPC requesting committed operation of counter_id + 1
	Receive(ctx context.Context, in *ReceiveRequest, opts ...grpc.CallOption) (*Operation, error)
	// Serverside streaming until both of their lamport counters matches.
	Watch(ctx context.Context, in *ReceiveRequest, opts ...grpc.CallOption) (OperationService_WatchClient, error)
}

OperationServiceClient is the client API for OperationService 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.

type OperationServiceServer

type OperationServiceServer interface {
	// Unary RPC requesting committed operation of counter_id + 1
	Receive(context.Context, *ReceiveRequest) (*Operation, error)
	// Serverside streaming until both of their lamport counters matches.
	Watch(*ReceiveRequest, OperationService_WatchServer) error
	// contains filtered or unexported methods
}

OperationServiceServer is the server API for OperationService service. All implementations must embed UnimplementedOperationServiceServer for forward compatibility

type OperationService_WatchClient

type OperationService_WatchClient interface {
	Recv() (*Operation, error)
	grpc.ClientStream
}

type OperationService_WatchServer

type OperationService_WatchServer interface {
	Send(*Operation) error
	grpc.ServerStream
}

type Operation_Id

type Operation_Id struct {
	ReplicaId string `protobuf:"bytes,1,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
	CounterId uint64 `protobuf:"varint,2,opt,name=counter_id,json=counterId,proto3" json:"counter_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Operation_Id) Descriptor deprecated

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

Deprecated: Use Operation_Id.ProtoReflect.Descriptor instead.

func (*Operation_Id) GetCounterId

func (x *Operation_Id) GetCounterId() uint64

func (*Operation_Id) GetReplicaId

func (x *Operation_Id) GetReplicaId() string

func (*Operation_Id) ProtoMessage

func (*Operation_Id) ProtoMessage()

func (*Operation_Id) ProtoReflect

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

func (*Operation_Id) Reset

func (x *Operation_Id) Reset()

func (*Operation_Id) String

func (x *Operation_Id) String() string

type PeerInfo

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

func (*PeerInfo) Descriptor deprecated

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

Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead.

func (*PeerInfo) GetIp

func (x *PeerInfo) GetIp() string

func (*PeerInfo) GetPort

func (x *PeerInfo) GetPort() uint32

func (*PeerInfo) ProtoMessage

func (*PeerInfo) ProtoMessage()

func (*PeerInfo) ProtoReflect

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

func (*PeerInfo) Reset

func (x *PeerInfo) Reset()

func (*PeerInfo) String

func (x *PeerInfo) String() string

type ReceiveRequest

type ReceiveRequest struct {

	// Node's latest lamport counter value.
	CounterId uint64 `protobuf:"varint,1,opt,name=counter_id,json=counterId,proto3" json:"counter_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiveRequest) Descriptor deprecated

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

Deprecated: Use ReceiveRequest.ProtoReflect.Descriptor instead.

func (*ReceiveRequest) GetCounterId

func (x *ReceiveRequest) GetCounterId() uint64

func (*ReceiveRequest) ProtoMessage

func (*ReceiveRequest) ProtoMessage()

func (*ReceiveRequest) ProtoReflect

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

func (*ReceiveRequest) Reset

func (x *ReceiveRequest) Reset()

func (*ReceiveRequest) String

func (x *ReceiveRequest) String() string

type UnimplementedDiscoveryServiceServer

type UnimplementedDiscoveryServiceServer struct {
}

UnimplementedDiscoveryServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDiscoveryServiceServer) Init

func (UnimplementedDiscoveryServiceServer) Watch

type UnimplementedHealthServiceServer

type UnimplementedHealthServiceServer struct {
}

UnimplementedHealthServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedHealthServiceServer) Check

func (UnimplementedHealthServiceServer) Watch

type UnimplementedOperationServiceServer

type UnimplementedOperationServiceServer struct {
}

UnimplementedOperationServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedOperationServiceServer) Receive

func (UnimplementedOperationServiceServer) Watch

type UnsafeDiscoveryServiceServer

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

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

type UnsafeHealthServiceServer

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

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

type UnsafeOperationServiceServer

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

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

Jump to

Keyboard shortcuts

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