nodesvc

package
v0.1.0-alpha4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_arrebato_node_service_v1_service_proto protoreflect.FileDescriptor
View Source
var NodeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "arrebato.node.service.v1.NodeService",
	HandlerType: (*NodeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Describe",
			Handler:    _NodeService_Describe_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _NodeService_Watch_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Backup",
			Handler:       _NodeService_Backup_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "arrebato/node/service/v1/service.proto",
}

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

Functions

func RegisterNodeServiceServer

func RegisterNodeServiceServer(s grpc.ServiceRegistrar, srv NodeServiceServer)

Types

type BackupRequest

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

The BackupRequest message is the request DTO when calling NodeService.Backup.

func (*BackupRequest) Descriptor deprecated

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

Deprecated: Use BackupRequest.ProtoReflect.Descriptor instead.

func (*BackupRequest) ProtoMessage

func (*BackupRequest) ProtoMessage()

func (*BackupRequest) ProtoReflect

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

func (*BackupRequest) Reset

func (x *BackupRequest) Reset()

func (*BackupRequest) String

func (x *BackupRequest) String() string

type BackupResponse

type BackupResponse struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

The BackupResponse message is the response DTO when calling NodeService.Backup. It contains some of the byte content of the backup.

func (*BackupResponse) Descriptor deprecated

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

Deprecated: Use BackupResponse.ProtoReflect.Descriptor instead.

func (*BackupResponse) GetData

func (x *BackupResponse) GetData() []byte

func (*BackupResponse) ProtoMessage

func (*BackupResponse) ProtoMessage()

func (*BackupResponse) ProtoReflect

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

func (*BackupResponse) Reset

func (x *BackupResponse) Reset()

func (*BackupResponse) String

func (x *BackupResponse) String() string

type DescribeRequest

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

The DescribeRequest message is the request DTO when calling NodeService.Describe.

func (*DescribeRequest) Descriptor deprecated

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

Deprecated: Use DescribeRequest.ProtoReflect.Descriptor instead.

func (*DescribeRequest) ProtoMessage

func (*DescribeRequest) ProtoMessage()

func (*DescribeRequest) ProtoReflect

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

func (*DescribeRequest) Reset

func (x *DescribeRequest) Reset()

func (*DescribeRequest) String

func (x *DescribeRequest) String() string

type DescribeResponse

type DescribeResponse struct {

	// Information about the queried node.
	Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// contains filtered or unexported fields
}

The DescribeResponse message is the response DTO when calling NodeService.Describe. It contains node details.

func (*DescribeResponse) Descriptor deprecated

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

Deprecated: Use DescribeResponse.ProtoReflect.Descriptor instead.

func (*DescribeResponse) GetNode

func (x *DescribeResponse) GetNode() *v1.Node

func (*DescribeResponse) ProtoMessage

func (*DescribeResponse) ProtoMessage()

func (*DescribeResponse) ProtoReflect

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

func (*DescribeResponse) Reset

func (x *DescribeResponse) Reset()

func (*DescribeResponse) String

func (x *DescribeResponse) String() string

type NodeServiceClient

type NodeServiceClient interface {
	// Describe the Node.
	Describe(ctx context.Context, in *DescribeRequest, opts ...grpc.CallOption) (*DescribeResponse, error)
	// Watch for changes to the node, including leadership status and new peers. Updates are written to the returned
	// stream.
	Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (NodeService_WatchClient, error)
	// Backup the node state, streaming the byte contents back to the client.
	Backup(ctx context.Context, in *BackupRequest, opts ...grpc.CallOption) (NodeService_BackupClient, error)
}

NodeServiceClient is the client API for NodeService 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 NodeServiceServer

type NodeServiceServer interface {
	// Describe the Node.
	Describe(context.Context, *DescribeRequest) (*DescribeResponse, error)
	// Watch for changes to the node, including leadership status and new peers. Updates are written to the returned
	// stream.
	Watch(*WatchRequest, NodeService_WatchServer) error
	// Backup the node state, streaming the byte contents back to the client.
	Backup(*BackupRequest, NodeService_BackupServer) error
}

NodeServiceServer is the server API for NodeService service. All implementations should embed UnimplementedNodeServiceServer for forward compatibility

type NodeService_BackupClient

type NodeService_BackupClient interface {
	Recv() (*BackupResponse, error)
	grpc.ClientStream
}

type NodeService_BackupServer

type NodeService_BackupServer interface {
	Send(*BackupResponse) error
	grpc.ServerStream
}

type NodeService_WatchClient

type NodeService_WatchClient interface {
	Recv() (*WatchResponse, error)
	grpc.ClientStream
}

type NodeService_WatchServer

type NodeService_WatchServer interface {
	Send(*WatchResponse) error
	grpc.ServerStream
}

type UnimplementedNodeServiceServer

type UnimplementedNodeServiceServer struct {
}

UnimplementedNodeServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedNodeServiceServer) Backup

func (UnimplementedNodeServiceServer) Describe

func (UnimplementedNodeServiceServer) Watch

type UnsafeNodeServiceServer

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

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

type WatchRequest

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

The WatchRequest message is the request DTO when calling NodeService.Watch.

func (*WatchRequest) Descriptor deprecated

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

Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.

func (*WatchRequest) ProtoMessage

func (*WatchRequest) ProtoMessage()

func (*WatchRequest) ProtoReflect

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

func (*WatchRequest) Reset

func (x *WatchRequest) Reset()

func (*WatchRequest) String

func (x *WatchRequest) String() string

type WatchResponse

type WatchResponse struct {

	// Information about the watched node.
	Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// contains filtered or unexported fields
}

The WatchResponse message is the response DTO when calling NodeService.Watch. It contains node details.

func (*WatchResponse) Descriptor deprecated

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

Deprecated: Use WatchResponse.ProtoReflect.Descriptor instead.

func (*WatchResponse) GetNode

func (x *WatchResponse) GetNode() *v1.Node

func (*WatchResponse) ProtoMessage

func (*WatchResponse) ProtoMessage()

func (*WatchResponse) ProtoReflect

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

func (*WatchResponse) Reset

func (x *WatchResponse) Reset()

func (*WatchResponse) String

func (x *WatchResponse) String() string

Jump to

Keyboard shortcuts

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