protobuf

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KafkaStreamer_Subscribe_FullMethodName = "/protobuf.KafkaStreamer/Subscribe"
)

Variables

View Source
var File_protobuf_service_proto protoreflect.FileDescriptor
View Source
var KafkaStreamer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protobuf.KafkaStreamer",
	HandlerType: (*KafkaStreamerServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _KafkaStreamer_Subscribe_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "protobuf/service.proto",
}

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

Functions

func RegisterKafkaStreamerServer

func RegisterKafkaStreamerServer(s grpc.ServiceRegistrar, srv KafkaStreamerServer)

Types

type Header struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Header) Descriptor deprecated

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

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetKey

func (x *Header) GetKey() string

func (*Header) GetValue

func (x *Header) GetValue() string

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

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

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

type KafkaStreamerClient

type KafkaStreamerClient interface {
	Subscribe(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SubscribeRequest, Message], error)
}

KafkaStreamerClient is the client API for KafkaStreamer 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 KafkaStreamerServer

type KafkaStreamerServer interface {
	Subscribe(grpc.BidiStreamingServer[SubscribeRequest, Message]) error
	// contains filtered or unexported methods
}

KafkaStreamerServer is the server API for KafkaStreamer service. All implementations must embed UnimplementedKafkaStreamerServer for forward compatibility.

type KafkaStreamer_SubscribeClient

type KafkaStreamer_SubscribeClient = grpc.BidiStreamingClient[SubscribeRequest, Message]

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

type KafkaStreamer_SubscribeServer

type KafkaStreamer_SubscribeServer = grpc.BidiStreamingServer[SubscribeRequest, Message]

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

type Message

type Message struct {
	Key       string    `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value     []byte    `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Headers   []*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"`
	Timestamp int64     `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Topic     string    `protobuf:"bytes,5,opt,name=topic,proto3" json:"topic,omitempty"`
	Partition int32     `protobuf:"varint,6,opt,name=partition,proto3" json:"partition,omitempty"`
	Offset    int64     `protobuf:"varint,7,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetHeaders

func (x *Message) GetHeaders() []*Header

func (*Message) GetKey

func (x *Message) GetKey() string

func (*Message) GetOffset

func (x *Message) GetOffset() int64

func (*Message) GetPartition

func (x *Message) GetPartition() int32

func (*Message) GetTimestamp

func (x *Message) GetTimestamp() int64

func (*Message) GetTopic

func (x *Message) GetTopic() string

func (*Message) GetValue

func (x *Message) GetValue() []byte

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type SubscribeRequest

type SubscribeRequest struct {
	Keys      []string `protobuf:"bytes,1,rep,name=Keys,proto3" json:"Keys,omitempty"`
	MinOffset int64    `protobuf:"varint,2,opt,name=min_offset,json=minOffset,proto3" json:"min_offset,omitempty"`
	MaxAge    string   `protobuf:"bytes,3,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeRequest) Descriptor deprecated

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

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetKeys added in v1.0.0

func (x *SubscribeRequest) GetKeys() []string

func (*SubscribeRequest) GetMaxAge added in v1.3.0

func (x *SubscribeRequest) GetMaxAge() string

func (*SubscribeRequest) GetMinOffset added in v1.3.0

func (x *SubscribeRequest) GetMinOffset() int64

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

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

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type UnimplementedKafkaStreamerServer

type UnimplementedKafkaStreamerServer struct{}

UnimplementedKafkaStreamerServer 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 (UnimplementedKafkaStreamerServer) Subscribe

type UnsafeKafkaStreamerServer

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

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

Jump to

Keyboard shortcuts

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