ordering

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Gorums_NodeStream_FullMethodName = "/ordering.Gorums/NodeStream"
)

Variables

View Source
var File_ordering_ordering_proto protoreflect.FileDescriptor
View Source
var Gorums_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ordering.Gorums",
	HandlerType: (*GorumsServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "NodeStream",
			Handler:       _Gorums_NodeStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "ordering/ordering.proto",
}

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

Functions

func RegisterGorumsServer

func RegisterGorumsServer(s grpc.ServiceRegistrar, srv GorumsServer)

Types

type GorumsClient

type GorumsClient interface {
	// NodeStream is a stream that connects a client to a Node.
	// The messages that are sent on the stream contain both Metadata
	// and an application-specific message.
	NodeStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Metadata, Metadata], error)
}

GorumsClient is the client API for Gorums 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 NewGorumsClient

func NewGorumsClient(cc grpc.ClientConnInterface) GorumsClient

type GorumsServer

type GorumsServer interface {
	// NodeStream is a stream that connects a client to a Node.
	// The messages that are sent on the stream contain both Metadata
	// and an application-specific message.
	NodeStream(grpc.BidiStreamingServer[Metadata, Metadata]) error
	// contains filtered or unexported methods
}

GorumsServer is the server API for Gorums service. All implementations must embed UnimplementedGorumsServer for forward compatibility.

type Gorums_NodeStreamClient

type Gorums_NodeStreamClient = grpc.BidiStreamingClient[Metadata, Metadata]

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

type Gorums_NodeStreamServer

type Gorums_NodeStreamServer = grpc.BidiStreamingServer[Metadata, Metadata]

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

type Metadata

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

Metadata is sent together with application-specific message types, and contains information necessary for Gorums to handle the messages.

func (*Metadata) ClearStatus added in v0.8.0

func (x *Metadata) ClearStatus()

func (*Metadata) GetMessageID

func (x *Metadata) GetMessageID() uint64

func (*Metadata) GetMethod added in v0.3.0

func (x *Metadata) GetMethod() string

func (*Metadata) GetStatus added in v0.2.1

func (x *Metadata) GetStatus() *status.Status

func (*Metadata) HasStatus added in v0.8.0

func (x *Metadata) HasStatus() bool

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

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

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) SetMessageID added in v0.8.0

func (x *Metadata) SetMessageID(v uint64)

func (*Metadata) SetMethod added in v0.8.0

func (x *Metadata) SetMethod(v string)

func (*Metadata) SetStatus added in v0.8.0

func (x *Metadata) SetStatus(v *status.Status)

func (*Metadata) String

func (x *Metadata) String() string

type Metadata_builder added in v0.8.0

type Metadata_builder struct {
	MessageID uint64
	Method    string
	Status    *status.Status
	// contains filtered or unexported fields
}

func (Metadata_builder) Build added in v0.8.0

func (b0 Metadata_builder) Build() *Metadata

type UnimplementedGorumsServer

type UnimplementedGorumsServer struct{}

UnimplementedGorumsServer 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 (UnimplementedGorumsServer) NodeStream

type UnsafeGorumsServer added in v0.3.0

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

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

Jump to

Keyboard shortcuts

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