grpc

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Woolf_CreatePartition_FullMethodName  = "/woolf.Woolf/CreatePartition"
	Woolf_GetStatus_FullMethodName        = "/woolf.Woolf/GetStatus"
	Woolf_GetSpaces_FullMethodName        = "/woolf.Woolf/GetSpaces"
	Woolf_GetPartitions_FullMethodName    = "/woolf.Woolf/GetPartitions"
	Woolf_Produce_FullMethodName          = "/woolf.Woolf/Produce"
	Woolf_ConsumeSpace_FullMethodName     = "/woolf.Woolf/ConsumeSpace"
	Woolf_ConsumePartition_FullMethodName = "/woolf.Woolf/ConsumePartition"
	Woolf_Peek_FullMethodName             = "/woolf.Woolf/Peek"
	Woolf_Merge_FullMethodName            = "/woolf.Woolf/Merge"
	Woolf_Prune_FullMethodName            = "/woolf.Woolf/Prune"
	Woolf_Rebuild_FullMethodName          = "/woolf.Woolf/Rebuild"
)

Variables

View Source
var File_services_proto protoreflect.FileDescriptor
View Source
var Woolf_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "woolf.Woolf",
	HandlerType: (*WoolfServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreatePartition",
			Handler:    _Woolf_CreatePartition_Handler,
		},
		{
			MethodName: "GetStatus",
			Handler:    _Woolf_GetStatus_Handler,
		},
		{
			MethodName: "Peek",
			Handler:    _Woolf_Peek_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetSpaces",
			Handler:       _Woolf_GetSpaces_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetPartitions",
			Handler:       _Woolf_GetPartitions_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Produce",
			Handler:       _Woolf_Produce_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "ConsumeSpace",
			Handler:       _Woolf_ConsumeSpace_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "ConsumePartition",
			Handler:       _Woolf_ConsumePartition_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Merge",
			Handler:       _Woolf_Merge_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Prune",
			Handler:       _Woolf_Prune_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Rebuild",
			Handler:       _Woolf_Rebuild_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "services.proto",
}

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

Functions

func RegisterWoolfServer

func RegisterWoolfServer(s grpc.ServiceRegistrar, srv WoolfServer)

func StartServer

func StartServer(ctx context.Context, ready chan struct{}, hosts ...string)

StartServer starts the gRPC server.

Types

type UnimplementedWoolfServer

type UnimplementedWoolfServer struct{}

UnimplementedWoolfServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedWoolfServer) CreatePartition

func (UnimplementedWoolfServer) GetStatus

func (UnimplementedWoolfServer) Peek

type UnsafeWoolfServer

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

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

type WoolfClient

type WoolfClient interface {
	CreatePartition(ctx context.Context, in *models.CreatePartitionRequest, opts ...grpc.CallOption) (*models.StatusResponse, error)
	GetStatus(ctx context.Context, in *models.GetStatusRequest, opts ...grpc.CallOption) (*models.StatusResponse, error)
	// Get the spaces
	GetSpaces(ctx context.Context, in *models.GetSpacesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[models.SpaceDescriptor], error)
	// Get the streams
	GetPartitions(ctx context.Context, in *models.GetPartitionsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[models.PartitionDescriptor], error)
	// Produce entries
	Produce(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[models.Entry, models.PageDescriptor], error)
	// Consume entries in a space.
	ConsumeSpace(ctx context.Context, in *models.ConsumeSpaceRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[models.EntryEnvelope], error)
	// Consume entries in a stream
	ConsumePartition(ctx context.Context, in *models.ConsumePartitionRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[models.EntryEnvelope], error)
	// Peek at the last entry in a stream
	Peek(ctx context.Context, in *models.PeekRequest, opts ...grpc.CallOption) (*models.EntryEnvelope, error)
	// Merge pages from a stream into the next tier
	Merge(ctx context.Context, in *models.MergeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[models.PageDescriptor], error)
	// Prune obsolete pages from a tier
	Prune(ctx context.Context, in *models.PruneRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[models.PageDescriptor], error)
	// Rebuild the manifest for a tier
	Rebuild(ctx context.Context, in *models.RebuildRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[models.RebuildResponse], error)
}

WoolfClient is the client API for Woolf 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.

PartitionServices is the service definition for the stream-related operations.

func NewWoolfClient

func NewWoolfClient(cc grpc.ClientConnInterface) WoolfClient

type WoolfGrpcServer

type WoolfGrpcServer interface {
	util.Disposable
	WoolfServer
}

func NewWoolfServer

func NewWoolfServer() WoolfGrpcServer

NewWoolfServer creates a new WoolfServerImpl instance.

type WoolfServer

type WoolfServer interface {
	CreatePartition(context.Context, *models.CreatePartitionRequest) (*models.StatusResponse, error)
	GetStatus(context.Context, *models.GetStatusRequest) (*models.StatusResponse, error)
	// Get the spaces
	GetSpaces(*models.GetSpacesRequest, grpc.ServerStreamingServer[models.SpaceDescriptor]) error
	// Get the streams
	GetPartitions(*models.GetPartitionsRequest, grpc.ServerStreamingServer[models.PartitionDescriptor]) error
	// Produce entries
	Produce(grpc.BidiStreamingServer[models.Entry, models.PageDescriptor]) error
	// Consume entries in a space.
	ConsumeSpace(*models.ConsumeSpaceRequest, grpc.ServerStreamingServer[models.EntryEnvelope]) error
	// Consume entries in a stream
	ConsumePartition(*models.ConsumePartitionRequest, grpc.ServerStreamingServer[models.EntryEnvelope]) error
	// Peek at the last entry in a stream
	Peek(context.Context, *models.PeekRequest) (*models.EntryEnvelope, error)
	// Merge pages from a stream into the next tier
	Merge(*models.MergeRequest, grpc.ServerStreamingServer[models.PageDescriptor]) error
	// Prune obsolete pages from a tier
	Prune(*models.PruneRequest, grpc.ServerStreamingServer[models.PageDescriptor]) error
	// Rebuild the manifest for a tier
	Rebuild(*models.RebuildRequest, grpc.ServerStreamingServer[models.RebuildResponse]) error
	// contains filtered or unexported methods
}

WoolfServer is the server API for Woolf service. All implementations must embed UnimplementedWoolfServer for forward compatibility.

PartitionServices is the service definition for the stream-related operations.

type Woolf_ConsumePartitionClient

type Woolf_ConsumePartitionClient = grpc.ServerStreamingClient[models.EntryEnvelope]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_ConsumePartitionServer

type Woolf_ConsumePartitionServer = grpc.ServerStreamingServer[models.EntryEnvelope]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_ConsumeSpaceClient

type Woolf_ConsumeSpaceClient = grpc.ServerStreamingClient[models.EntryEnvelope]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_ConsumeSpaceServer

type Woolf_ConsumeSpaceServer = grpc.ServerStreamingServer[models.EntryEnvelope]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_GetPartitionsClient

type Woolf_GetPartitionsClient = grpc.ServerStreamingClient[models.PartitionDescriptor]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_GetPartitionsServer

type Woolf_GetPartitionsServer = grpc.ServerStreamingServer[models.PartitionDescriptor]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_GetSpacesClient

type Woolf_GetSpacesClient = grpc.ServerStreamingClient[models.SpaceDescriptor]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_GetSpacesServer

type Woolf_GetSpacesServer = grpc.ServerStreamingServer[models.SpaceDescriptor]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_MergeClient

type Woolf_MergeClient = grpc.ServerStreamingClient[models.PageDescriptor]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_MergeServer

type Woolf_MergeServer = grpc.ServerStreamingServer[models.PageDescriptor]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_ProduceClient

type Woolf_ProduceClient = grpc.BidiStreamingClient[models.Entry, models.PageDescriptor]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_ProduceServer

type Woolf_ProduceServer = grpc.BidiStreamingServer[models.Entry, models.PageDescriptor]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_PruneClient

type Woolf_PruneClient = grpc.ServerStreamingClient[models.PageDescriptor]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_PruneServer

type Woolf_PruneServer = grpc.ServerStreamingServer[models.PageDescriptor]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_RebuildClient

type Woolf_RebuildClient = grpc.ServerStreamingClient[models.RebuildResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Woolf_RebuildServer

type Woolf_RebuildServer = grpc.ServerStreamingServer[models.RebuildResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

Jump to

Keyboard shortcuts

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