pb

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:

kafkapixy.proto

It has these top-level messages:

RecordHeader
ProdRq
ProdRs
ConsNAckRq
ConsRs
AckRq
AckRs
PartitionOffset
GetOffsetsRq
GetOffsetsRs
PartitionMetadata
GetTopicMetadataRq
GetTopicMetadataRs
ListTopicRs
ListTopicRq
ListConsumersRq
ConsumerPartitions
ConsumerGroups
ListConsumersRs
SetOffsetsRq
SetOffsetsRs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterKafkaPixyServer

func RegisterKafkaPixyServer(s *grpc.Server, srv KafkaPixyServer)

Types

type AckRq added in v0.13.0

type AckRq struct {
	// Name of a Kafka cluster to operate on.
	Cluster string `protobuf:"bytes,1,opt,name=cluster" json:"cluster,omitempty"`
	// Name of a topic to produce to.
	Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
	// Name of a consumer group.
	Group string `protobuf:"bytes,3,opt,name=group" json:"group,omitempty"`
	// Partition that the acknowledged message was consumed from.
	Partition int32 `protobuf:"varint,4,opt,name=partition" json:"partition,omitempty"`
	// Offset in the partition that the acknowledged message was consumed from.
	Offset int64 `protobuf:"varint,5,opt,name=offset" json:"offset,omitempty"`
}

func (*AckRq) Descriptor added in v0.13.0

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

func (*AckRq) GetCluster added in v0.13.0

func (m *AckRq) GetCluster() string

func (*AckRq) GetGroup added in v0.13.0

func (m *AckRq) GetGroup() string

func (*AckRq) GetOffset added in v0.13.0

func (m *AckRq) GetOffset() int64

func (*AckRq) GetPartition added in v0.13.0

func (m *AckRq) GetPartition() int32

func (*AckRq) GetTopic added in v0.13.0

func (m *AckRq) GetTopic() string

func (*AckRq) ProtoMessage added in v0.13.0

func (*AckRq) ProtoMessage()

func (*AckRq) Reset added in v0.13.0

func (m *AckRq) Reset()

func (*AckRq) String added in v0.13.0

func (m *AckRq) String() string

type AckRs added in v0.13.0

type AckRs struct {
}

func (*AckRs) Descriptor added in v0.13.0

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

func (*AckRs) ProtoMessage added in v0.13.0

func (*AckRs) ProtoMessage()

func (*AckRs) Reset added in v0.13.0

func (m *AckRs) Reset()

func (*AckRs) String added in v0.13.0

func (m *AckRs) String() string

type ConsNAckRq added in v0.13.0

type ConsNAckRq struct {
	// Name of a Kafka cluster to operate on.
	Cluster string `protobuf:"bytes,1,opt,name=cluster" json:"cluster,omitempty"`
	// Name of a topic to produce to.
	Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
	// Name of a consumer group.
	Group string `protobuf:"bytes,3,opt,name=group" json:"group,omitempty"`
	// If true then no message is acknowledged by the request.
	NoAck bool `protobuf:"varint,4,opt,name=no_ack,json=noAck" json:"no_ack,omitempty"`
	// If true and no_ack is false then the message returned by the requests is
	// automatically acknowledged by Kafka-Pixy before the request completes.
	AutoAck bool `protobuf:"varint,5,opt,name=auto_ack,json=autoAck" json:"auto_ack,omitempty"`
	// If both no_ack and auto_ack are false (by default), then ack_partition
	// and ack_offset along with cluster-group-topic determine the message that
	// should be acknowledged by the request.
	AckPartition int32 `protobuf:"varint,6,opt,name=ack_partition,json=ackPartition" json:"ack_partition,omitempty"`
	AckOffset    int64 `protobuf:"varint,7,opt,name=ack_offset,json=ackOffset" json:"ack_offset,omitempty"`
}

func (*ConsNAckRq) Descriptor added in v0.13.0

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

func (*ConsNAckRq) GetAckOffset added in v0.13.0

func (m *ConsNAckRq) GetAckOffset() int64

func (*ConsNAckRq) GetAckPartition added in v0.13.0

func (m *ConsNAckRq) GetAckPartition() int32

func (*ConsNAckRq) GetAutoAck added in v0.13.0

func (m *ConsNAckRq) GetAutoAck() bool

func (*ConsNAckRq) GetCluster added in v0.13.0

func (m *ConsNAckRq) GetCluster() string

func (*ConsNAckRq) GetGroup added in v0.13.0

func (m *ConsNAckRq) GetGroup() string

func (*ConsNAckRq) GetNoAck added in v0.13.0

func (m *ConsNAckRq) GetNoAck() bool

func (*ConsNAckRq) GetTopic added in v0.13.0

func (m *ConsNAckRq) GetTopic() string

func (*ConsNAckRq) ProtoMessage added in v0.13.0

func (*ConsNAckRq) ProtoMessage()

func (*ConsNAckRq) Reset added in v0.13.0

func (m *ConsNAckRq) Reset()

func (*ConsNAckRq) String added in v0.13.0

func (m *ConsNAckRq) String() string

type ConsRs added in v0.13.0

type ConsRs struct {
	// Partition the message was read from.
	Partition int32 `protobuf:"varint,1,opt,name=partition" json:"partition,omitempty"`
	// Offset of the read message in the partition.
	Offset int64 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"`
	// Key that was used to produce the message, unless key_undefined is true,
	// then it is undefined.
	KeyValue []byte `protobuf:"bytes,3,opt,name=key_value,json=keyValue,proto3" json:"key_value,omitempty"`
	// If true then the message was produced to a random partition.
	KeyUndefined bool `protobuf:"varint,4,opt,name=key_undefined,json=keyUndefined" json:"key_undefined,omitempty"`
	// Message body
	Message []byte `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	// Headers associated with the message
	Headers []*RecordHeader `protobuf:"bytes,6,rep,name=headers" json:"headers,omitempty"`
}

func (*ConsRs) Descriptor added in v0.13.0

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

func (*ConsRs) GetHeaders added in v0.16.0

func (m *ConsRs) GetHeaders() []*RecordHeader

func (*ConsRs) GetKeyUndefined added in v0.13.0

func (m *ConsRs) GetKeyUndefined() bool

func (*ConsRs) GetKeyValue added in v0.13.0

func (m *ConsRs) GetKeyValue() []byte

func (*ConsRs) GetMessage added in v0.13.0

func (m *ConsRs) GetMessage() []byte

func (*ConsRs) GetOffset added in v0.13.0

func (m *ConsRs) GetOffset() int64

func (*ConsRs) GetPartition added in v0.13.0

func (m *ConsRs) GetPartition() int32

func (*ConsRs) ProtoMessage added in v0.13.0

func (*ConsRs) ProtoMessage()

func (*ConsRs) Reset added in v0.13.0

func (m *ConsRs) Reset()

func (*ConsRs) String added in v0.13.0

func (m *ConsRs) String() string

type ConsumerGroups added in v0.15.0

type ConsumerGroups struct {
	Consumers map[string]*ConsumerPartitions `` /* 138-byte string literal not displayed */
}

func (*ConsumerGroups) Descriptor added in v0.15.0

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

func (*ConsumerGroups) GetConsumers added in v0.15.0

func (m *ConsumerGroups) GetConsumers() map[string]*ConsumerPartitions

func (*ConsumerGroups) ProtoMessage added in v0.15.0

func (*ConsumerGroups) ProtoMessage()

func (*ConsumerGroups) Reset added in v0.15.0

func (m *ConsumerGroups) Reset()

func (*ConsumerGroups) String added in v0.15.0

func (m *ConsumerGroups) String() string

type ConsumerPartitions added in v0.15.0

type ConsumerPartitions struct {
	Partitions []int32 `protobuf:"varint,1,rep,packed,name=partitions" json:"partitions,omitempty"`
}

func (*ConsumerPartitions) Descriptor added in v0.15.0

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

func (*ConsumerPartitions) GetPartitions added in v0.15.0

func (m *ConsumerPartitions) GetPartitions() []int32

func (*ConsumerPartitions) ProtoMessage added in v0.15.0

func (*ConsumerPartitions) ProtoMessage()

func (*ConsumerPartitions) Reset added in v0.15.0

func (m *ConsumerPartitions) Reset()

func (*ConsumerPartitions) String added in v0.15.0

func (m *ConsumerPartitions) String() string

type GetOffsetsRq added in v0.14.0

type GetOffsetsRq struct {
	// Name of a Kafka cluster
	Cluster string `protobuf:"bytes,1,opt,name=cluster" json:"cluster,omitempty"`
	// Name of a topic
	Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
	// Name of a consumer group.
	Group string `protobuf:"bytes,3,opt,name=group" json:"group,omitempty"`
}

func (*GetOffsetsRq) Descriptor added in v0.14.0

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

func (*GetOffsetsRq) GetCluster added in v0.14.0

func (m *GetOffsetsRq) GetCluster() string

func (*GetOffsetsRq) GetGroup added in v0.14.0

func (m *GetOffsetsRq) GetGroup() string

func (*GetOffsetsRq) GetTopic added in v0.14.0

func (m *GetOffsetsRq) GetTopic() string

func (*GetOffsetsRq) ProtoMessage added in v0.14.0

func (*GetOffsetsRq) ProtoMessage()

func (*GetOffsetsRq) Reset added in v0.14.0

func (m *GetOffsetsRq) Reset()

func (*GetOffsetsRq) String added in v0.14.0

func (m *GetOffsetsRq) String() string

type GetOffsetsRs added in v0.14.0

type GetOffsetsRs struct {
	Offsets []*PartitionOffset `protobuf:"bytes,1,rep,name=offsets" json:"offsets,omitempty"`
}

func (*GetOffsetsRs) Descriptor added in v0.14.0

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

func (*GetOffsetsRs) GetOffsets added in v0.14.0

func (m *GetOffsetsRs) GetOffsets() []*PartitionOffset

func (*GetOffsetsRs) ProtoMessage added in v0.14.0

func (*GetOffsetsRs) ProtoMessage()

func (*GetOffsetsRs) Reset added in v0.14.0

func (m *GetOffsetsRs) Reset()

func (*GetOffsetsRs) String added in v0.14.0

func (m *GetOffsetsRs) String() string

type GetTopicMetadataRq added in v0.15.0

type GetTopicMetadataRq struct {
	// Name of a Kafka cluster
	Cluster string `protobuf:"bytes,1,opt,name=cluster" json:"cluster,omitempty"`
	// Name of a topic
	Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
	// Should include partition metadata
	WithPartitions bool `protobuf:"varint,3,opt,name=with_partitions,json=withPartitions" json:"with_partitions,omitempty"`
}

func (*GetTopicMetadataRq) Descriptor added in v0.15.0

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

func (*GetTopicMetadataRq) GetCluster added in v0.15.0

func (m *GetTopicMetadataRq) GetCluster() string

func (*GetTopicMetadataRq) GetTopic added in v0.15.0

func (m *GetTopicMetadataRq) GetTopic() string

func (*GetTopicMetadataRq) GetWithPartitions added in v0.15.0

func (m *GetTopicMetadataRq) GetWithPartitions() bool

func (*GetTopicMetadataRq) ProtoMessage added in v0.15.0

func (*GetTopicMetadataRq) ProtoMessage()

func (*GetTopicMetadataRq) Reset added in v0.15.0

func (m *GetTopicMetadataRq) Reset()

func (*GetTopicMetadataRq) String added in v0.15.0

func (m *GetTopicMetadataRq) String() string

type GetTopicMetadataRs added in v0.15.0

type GetTopicMetadataRs struct {
	// Version of this metadata
	Version int32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
	// Config values
	Config map[string]string `` /* 132-byte string literal not displayed */
	// Optional list of metadata for the partitions of this topic
	Partitions []*PartitionMetadata `protobuf:"bytes,3,rep,name=partitions" json:"partitions,omitempty"`
}

func (*GetTopicMetadataRs) Descriptor added in v0.15.0

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

func (*GetTopicMetadataRs) GetConfig added in v0.15.0

func (m *GetTopicMetadataRs) GetConfig() map[string]string

func (*GetTopicMetadataRs) GetPartitions added in v0.15.0

func (m *GetTopicMetadataRs) GetPartitions() []*PartitionMetadata

func (*GetTopicMetadataRs) GetVersion added in v0.15.0

func (m *GetTopicMetadataRs) GetVersion() int32

func (*GetTopicMetadataRs) ProtoMessage added in v0.15.0

func (*GetTopicMetadataRs) ProtoMessage()

func (*GetTopicMetadataRs) Reset added in v0.15.0

func (m *GetTopicMetadataRs) Reset()

func (*GetTopicMetadataRs) String added in v0.15.0

func (m *GetTopicMetadataRs) String() string

type KafkaPixyClient

type KafkaPixyClient interface {
	// Produce writes a message to a Kafka topic.
	//
	// If ProdReq.async_mode is false (default value) then the request will
	// block until the message is written to all ISR. In this case the respose
	// will contain the partition and offset of the message. This has to be
	// used to achive at-least-once deliverability guarantee.
	// If ProdReq.async_mode is true, then Kafka-Pixy returns immediately after
	// it gets the request and performs write on the backgroud. This mode
	// ensures highest throughput but messages can be lost, e.g. if the host
	// crashes before Kafka-Pixy has a chance to complete write.
	//
	// Hash of ProdReq.key_value is used to determine a partition that the
	// message should be written to. If you want a message to go to an random
	// partition then set ProdReq.key_undefined to true. Note that if both
	// ProdReq.key_undefined and ProdReq.key_value are left default, which is
	// empty string and false respectively, then messages will be consitently
	// written to a partiticular partition selected by the hash of an empty
	// string.
	//
	// gRPC error codes:
	//  * Invalid Argument (3): see the status description for details;
	//  * Internal (13): see the status description and logs for details;
	//  * Unavailable (14): the service is shutting down.
	Produce(ctx context.Context, in *ProdRq, opts ...grpc.CallOption) (*ProdRs, error)
	// Consume reads a message from a topic and optionally acknowledges a
	// message previously consumed from the same topic.
	//
	// Requests are performed in long polling fation, that is if all available
	// messages have been consumed then the request will block for
	// config.yaml:proxies.<cluster>.consumer.long_polling_timeout waiting for
	// new messages. If no new messages is produced while waiting the request
	// will return gRPC error with 408 status code.
	//
	// To consume the first message set ConsNAckReq.no_ack to true, since there
	// is no message to acknowledge at this point. In the second and all
	// subsequent calls of the method set ConsNAckReq.ack_partition and
	// ConsNAckReq.ack_offset to the respective values of ConsRes returned by
	// the previous method call. To acknowledge the last consumed message before
	// teminating the application call Ack method.
	//
	// If a message is not acknowledged within
	// config.yaml:proxies.<cluster>.consumer.ack_timeout the it will be returned
	// by Kafka-Pixy in ConsRes again possibly to another application.
	//
	// If at-least-once delivery guarantee and retries are not desirable, then
	// you can set ConsNAckReq.auto_ack to true and Kafka-Pixy will acknowledge
	// messages automatically before returning them in ConsRes.
	//
	// gRPC error codes:
	//  * Not Found (5): It just means that all message has been consumed and
	//    the long polling timeout has elaspsed. Just keep calling this method
	//    in a loop;
	//  * Resource Exhausted (8): too many consume requests. Either reduce the
	//    number of consuming threads or increase
	//    config.yaml:proxies.<cluster>.consumer.channel_buffer_size;
	//  * Invalid Argument (3): see the status description for details;
	//  * Internal (13): see the status description and logs for details;
	//  * Unavailable (14): the service is shutting down.
	ConsumeNAck(ctx context.Context, in *ConsNAckRq, opts ...grpc.CallOption) (*ConsRs, error)
	// Ack acknowledges a message earlier consumed from a topic.
	//
	// This method is provided solely to acknowledge the last consumed message
	// before the application terminates. In all other cases ConsumeNAck should
	// be used.
	//
	// gRPC error codes:
	//  * Invalid Argument (3): see the status description for details;
	//  * Internal (13): see the status description and logs for details;
	Ack(ctx context.Context, in *AckRq, opts ...grpc.CallOption) (*AckRs, error)
	// Fetches partition offsets for the specified topic and group
	//
	// gRPC error codes:
	//  * Invalid Argument (3): If unable to find the cluster named in the request
	//  * Internal (13): If Kafka returns an error on offset request
	//  * NotFound (5): If the group and or topic does not exist
	GetOffsets(ctx context.Context, in *GetOffsetsRq, opts ...grpc.CallOption) (*GetOffsetsRs, error)
	// Sets partition offsets for the specified topic and group.
	// NOTE: Although the request accepts the PartitionOffset object i
	// only 'Partition', 'Offset' and 'Metadata' are set by this method
	//
	// gRPC error codes:
	//  * Invalid Argument (3): If unable to find the cluster named in the request
	//  * Internal (13): If Kafka returns an error on offset request
	//  * NotFound (5): If the group and or topic does not exist
	SetOffsets(ctx context.Context, in *SetOffsetsRq, opts ...grpc.CallOption) (*SetOffsetsRs, error)
	// Lists all topics and metadata with optional metadata for the partitions of the topic
	//
	// gRPC error codes:
	//  * Invalid Argument (3): If unable to find the cluster named in the request
	//  * Internal (13): If Kafka returns an error on request
	ListTopics(ctx context.Context, in *ListTopicRq, opts ...grpc.CallOption) (*ListTopicRs, error)
	// Lists all consumers of a topic
	//
	// gRPC error codes:
	//  * Invalid Argument (3): If unable to find the cluster named in the request
	//  * Internal (13): If Kafka returns an error on request
	ListConsumers(ctx context.Context, in *ListConsumersRq, opts ...grpc.CallOption) (*ListConsumersRs, error)
	// Fetches topic metadata and optional metadata for the partitions of the topic
	//
	// gRPC error codes:
	//  * Invalid Argument (3): If unable to find the cluster named in the request
	//  * Internal (13): If Kafka returns an error on request
	//  * NotFound (5): If the topic does not exist
	GetTopicMetadata(ctx context.Context, in *GetTopicMetadataRq, opts ...grpc.CallOption) (*GetTopicMetadataRs, error)
}

func NewKafkaPixyClient

func NewKafkaPixyClient(cc *grpc.ClientConn) KafkaPixyClient

type KafkaPixyServer

type KafkaPixyServer interface {
	// Produce writes a message to a Kafka topic.
	//
	// If ProdReq.async_mode is false (default value) then the request will
	// block until the message is written to all ISR. In this case the respose
	// will contain the partition and offset of the message. This has to be
	// used to achive at-least-once deliverability guarantee.
	// If ProdReq.async_mode is true, then Kafka-Pixy returns immediately after
	// it gets the request and performs write on the backgroud. This mode
	// ensures highest throughput but messages can be lost, e.g. if the host
	// crashes before Kafka-Pixy has a chance to complete write.
	//
	// Hash of ProdReq.key_value is used to determine a partition that the
	// message should be written to. If you want a message to go to an random
	// partition then set ProdReq.key_undefined to true. Note that if both
	// ProdReq.key_undefined and ProdReq.key_value are left default, which is
	// empty string and false respectively, then messages will be consitently
	// written to a partiticular partition selected by the hash of an empty
	// string.
	//
	// gRPC error codes:
	//  * Invalid Argument (3): see the status description for details;
	//  * Internal (13): see the status description and logs for details;
	//  * Unavailable (14): the service is shutting down.
	Produce(context.Context, *ProdRq) (*ProdRs, error)
	// Consume reads a message from a topic and optionally acknowledges a
	// message previously consumed from the same topic.
	//
	// Requests are performed in long polling fation, that is if all available
	// messages have been consumed then the request will block for
	// config.yaml:proxies.<cluster>.consumer.long_polling_timeout waiting for
	// new messages. If no new messages is produced while waiting the request
	// will return gRPC error with 408 status code.
	//
	// To consume the first message set ConsNAckReq.no_ack to true, since there
	// is no message to acknowledge at this point. In the second and all
	// subsequent calls of the method set ConsNAckReq.ack_partition and
	// ConsNAckReq.ack_offset to the respective values of ConsRes returned by
	// the previous method call. To acknowledge the last consumed message before
	// teminating the application call Ack method.
	//
	// If a message is not acknowledged within
	// config.yaml:proxies.<cluster>.consumer.ack_timeout the it will be returned
	// by Kafka-Pixy in ConsRes again possibly to another application.
	//
	// If at-least-once delivery guarantee and retries are not desirable, then
	// you can set ConsNAckReq.auto_ack to true and Kafka-Pixy will acknowledge
	// messages automatically before returning them in ConsRes.
	//
	// gRPC error codes:
	//  * Not Found (5): It just means that all message has been consumed and
	//    the long polling timeout has elaspsed. Just keep calling this method
	//    in a loop;
	//  * Resource Exhausted (8): too many consume requests. Either reduce the
	//    number of consuming threads or increase
	//    config.yaml:proxies.<cluster>.consumer.channel_buffer_size;
	//  * Invalid Argument (3): see the status description for details;
	//  * Internal (13): see the status description and logs for details;
	//  * Unavailable (14): the service is shutting down.
	ConsumeNAck(context.Context, *ConsNAckRq) (*ConsRs, error)
	// Ack acknowledges a message earlier consumed from a topic.
	//
	// This method is provided solely to acknowledge the last consumed message
	// before the application terminates. In all other cases ConsumeNAck should
	// be used.
	//
	// gRPC error codes:
	//  * Invalid Argument (3): see the status description for details;
	//  * Internal (13): see the status description and logs for details;
	Ack(context.Context, *AckRq) (*AckRs, error)
	// Fetches partition offsets for the specified topic and group
	//
	// gRPC error codes:
	//  * Invalid Argument (3): If unable to find the cluster named in the request
	//  * Internal (13): If Kafka returns an error on offset request
	//  * NotFound (5): If the group and or topic does not exist
	GetOffsets(context.Context, *GetOffsetsRq) (*GetOffsetsRs, error)
	// Sets partition offsets for the specified topic and group.
	// NOTE: Although the request accepts the PartitionOffset object i
	// only 'Partition', 'Offset' and 'Metadata' are set by this method
	//
	// gRPC error codes:
	//  * Invalid Argument (3): If unable to find the cluster named in the request
	//  * Internal (13): If Kafka returns an error on offset request
	//  * NotFound (5): If the group and or topic does not exist
	SetOffsets(context.Context, *SetOffsetsRq) (*SetOffsetsRs, error)
	// Lists all topics and metadata with optional metadata for the partitions of the topic
	//
	// gRPC error codes:
	//  * Invalid Argument (3): If unable to find the cluster named in the request
	//  * Internal (13): If Kafka returns an error on request
	ListTopics(context.Context, *ListTopicRq) (*ListTopicRs, error)
	// Lists all consumers of a topic
	//
	// gRPC error codes:
	//  * Invalid Argument (3): If unable to find the cluster named in the request
	//  * Internal (13): If Kafka returns an error on request
	ListConsumers(context.Context, *ListConsumersRq) (*ListConsumersRs, error)
	// Fetches topic metadata and optional metadata for the partitions of the topic
	//
	// gRPC error codes:
	//  * Invalid Argument (3): If unable to find the cluster named in the request
	//  * Internal (13): If Kafka returns an error on request
	//  * NotFound (5): If the topic does not exist
	GetTopicMetadata(context.Context, *GetTopicMetadataRq) (*GetTopicMetadataRs, error)
}

type ListConsumersRq added in v0.15.0

type ListConsumersRq struct {
	// Name of a Kafka cluster
	Cluster string `protobuf:"bytes,1,opt,name=cluster" json:"cluster,omitempty"`
	// Name of a topic
	Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
	// If non empty, return only the specified group in the result
	Group string `protobuf:"bytes,3,opt,name=group" json:"group,omitempty"`
}

func (*ListConsumersRq) Descriptor added in v0.15.0

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

func (*ListConsumersRq) GetCluster added in v0.15.0

func (m *ListConsumersRq) GetCluster() string

func (*ListConsumersRq) GetGroup added in v0.15.0

func (m *ListConsumersRq) GetGroup() string

func (*ListConsumersRq) GetTopic added in v0.15.0

func (m *ListConsumersRq) GetTopic() string

func (*ListConsumersRq) ProtoMessage added in v0.15.0

func (*ListConsumersRq) ProtoMessage()

func (*ListConsumersRq) Reset added in v0.15.0

func (m *ListConsumersRq) Reset()

func (*ListConsumersRq) String added in v0.15.0

func (m *ListConsumersRq) String() string

type ListConsumersRs added in v0.15.0

type ListConsumersRs struct {
	Groups map[string]*ConsumerGroups `` /* 132-byte string literal not displayed */
}

func (*ListConsumersRs) Descriptor added in v0.15.0

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

func (*ListConsumersRs) GetGroups added in v0.15.0

func (m *ListConsumersRs) GetGroups() map[string]*ConsumerGroups

func (*ListConsumersRs) ProtoMessage added in v0.15.0

func (*ListConsumersRs) ProtoMessage()

func (*ListConsumersRs) Reset added in v0.15.0

func (m *ListConsumersRs) Reset()

func (*ListConsumersRs) String added in v0.15.0

func (m *ListConsumersRs) String() string

type ListTopicRq added in v0.15.0

type ListTopicRq struct {
	// Name of a Kafka cluster
	Cluster string `protobuf:"bytes,1,opt,name=cluster" json:"cluster,omitempty"`
	// Should include partition metadata
	WithPartitions bool `protobuf:"varint,2,opt,name=with_partitions,json=withPartitions" json:"with_partitions,omitempty"`
}

func (*ListTopicRq) Descriptor added in v0.15.0

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

func (*ListTopicRq) GetCluster added in v0.15.0

func (m *ListTopicRq) GetCluster() string

func (*ListTopicRq) GetWithPartitions added in v0.15.0

func (m *ListTopicRq) GetWithPartitions() bool

func (*ListTopicRq) ProtoMessage added in v0.15.0

func (*ListTopicRq) ProtoMessage()

func (*ListTopicRq) Reset added in v0.15.0

func (m *ListTopicRq) Reset()

func (*ListTopicRq) String added in v0.15.0

func (m *ListTopicRq) String() string

type ListTopicRs added in v0.15.0

type ListTopicRs struct {
	Topics map[string]*GetTopicMetadataRs `` /* 132-byte string literal not displayed */
}

func (*ListTopicRs) Descriptor added in v0.15.0

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

func (*ListTopicRs) GetTopics added in v0.15.0

func (m *ListTopicRs) GetTopics() map[string]*GetTopicMetadataRs

func (*ListTopicRs) ProtoMessage added in v0.15.0

func (*ListTopicRs) ProtoMessage()

func (*ListTopicRs) Reset added in v0.15.0

func (m *ListTopicRs) Reset()

func (*ListTopicRs) String added in v0.15.0

func (m *ListTopicRs) String() string

type PartitionMetadata added in v0.15.0

type PartitionMetadata struct {
	// The Partition this structure describes
	Partition int32 `protobuf:"varint,1,opt,name=partition" json:"partition,omitempty"`
	// The node id for the kafka broker currently acting as leader for this partition.
	// If no leader exists because we are in the middle of a leader election this id will be -1.
	Leader int32 `protobuf:"varint,2,opt,name=leader" json:"leader,omitempty"`
	// The set of alive nodes that currently acts as slaves for the leader for this partition.
	Replicas []int32 `protobuf:"varint,3,rep,packed,name=replicas" json:"replicas,omitempty"`
	// The set subset of the replicas that are "caught up" to the leader
	Isr []int32 `protobuf:"varint,4,rep,packed,name=isr" json:"isr,omitempty"`
}

Partition metadata as retrieved from kafka

func (*PartitionMetadata) Descriptor added in v0.15.0

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

func (*PartitionMetadata) GetIsr added in v0.15.0

func (m *PartitionMetadata) GetIsr() []int32

func (*PartitionMetadata) GetLeader added in v0.15.0

func (m *PartitionMetadata) GetLeader() int32

func (*PartitionMetadata) GetPartition added in v0.15.0

func (m *PartitionMetadata) GetPartition() int32

func (*PartitionMetadata) GetReplicas added in v0.15.0

func (m *PartitionMetadata) GetReplicas() []int32

func (*PartitionMetadata) ProtoMessage added in v0.15.0

func (*PartitionMetadata) ProtoMessage()

func (*PartitionMetadata) Reset added in v0.15.0

func (m *PartitionMetadata) Reset()

func (*PartitionMetadata) String added in v0.15.0

func (m *PartitionMetadata) String() string

type PartitionOffset added in v0.14.0

type PartitionOffset struct {
	// The Partition this structure describes
	Partition int32 `protobuf:"varint,1,opt,name=partition" json:"partition,omitempty"`
	// The beginning offset
	Begin int64 `protobuf:"varint,2,opt,name=begin" json:"begin,omitempty"`
	// The ending offset
	End int64 `protobuf:"varint,3,opt,name=end" json:"end,omitempty"`
	// The number of messages in the partition
	Count int64 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"`
	// Offset in the partition
	Offset int64 `protobuf:"varint,5,opt,name=offset" json:"offset,omitempty"`
	// The number of un-consumed messages in the partition
	Lag int64 `protobuf:"varint,6,opt,name=lag" json:"lag,omitempty"`
	// Metatdata associated with the partition
	Metadata string `protobuf:"bytes,7,opt,name=metadata" json:"metadata,omitempty"`
	// human readable representation of sparsely committed ranges
	SparseAcks string `protobuf:"bytes,8,opt,name=sparse_acks,json=sparseAcks" json:"sparse_acks,omitempty"`
}

func (*PartitionOffset) Descriptor added in v0.14.0

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

func (*PartitionOffset) GetBegin added in v0.14.0

func (m *PartitionOffset) GetBegin() int64

func (*PartitionOffset) GetCount added in v0.14.0

func (m *PartitionOffset) GetCount() int64

func (*PartitionOffset) GetEnd added in v0.14.0

func (m *PartitionOffset) GetEnd() int64

func (*PartitionOffset) GetLag added in v0.14.0

func (m *PartitionOffset) GetLag() int64

func (*PartitionOffset) GetMetadata added in v0.14.0

func (m *PartitionOffset) GetMetadata() string

func (*PartitionOffset) GetOffset added in v0.14.0

func (m *PartitionOffset) GetOffset() int64

func (*PartitionOffset) GetPartition added in v0.14.0

func (m *PartitionOffset) GetPartition() int32

func (*PartitionOffset) GetSparseAcks added in v0.14.0

func (m *PartitionOffset) GetSparseAcks() string

func (*PartitionOffset) ProtoMessage added in v0.14.0

func (*PartitionOffset) ProtoMessage()

func (*PartitionOffset) Reset added in v0.14.0

func (m *PartitionOffset) Reset()

func (*PartitionOffset) String added in v0.14.0

func (m *PartitionOffset) String() string

type ProdRq added in v0.13.0

type ProdRq struct {
	// Name of a Kafka cluster to operate on.
	Cluster string `protobuf:"bytes,1,opt,name=cluster" json:"cluster,omitempty"`
	// Name of a topic to produce to.
	Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
	// Hash of the key is used to determine the partition to produce to. By
	// default it is an empty array which is a valid key, unless key_undefined
	// is set to true and then a random partition is selected.
	KeyValue []byte `protobuf:"bytes,3,opt,name=key_value,json=keyValue,proto3" json:"key_value,omitempty"`
	// If true then the message is written to a random partition, otherwise
	// hash of key_value is used to determine the partition.
	KeyUndefined bool `protobuf:"varint,4,opt,name=key_undefined,json=keyUndefined" json:"key_undefined,omitempty"`
	// Message body.
	Message []byte `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	// If true then the method returns immediately after Kafka-Pixy gets the
	// produce request, and the message is written to Kafka asynchronously.
	// In that case partition and offset returned in response should be ignored.
	// If false, then a response is returned in accordance with the
	// producer.required_acks parameter, that can be one of:
	//  * no_response:    the response is returned as soon as a produce request
	//                    is delivered to a partition leader Kafka broker.
	//  * wait_for_local: the response is returned as soon as data is written
	//                    to the disk by a partition leader Kafka broker.
	//  * wait_for_all:   the response is returned after all in-sync replicas
	//                    have data committed to disk.
	AsyncMode bool `protobuf:"varint,6,opt,name=async_mode,json=asyncMode" json:"async_mode,omitempty"`
	// Headers to include with the published message
	Headers []*RecordHeader `protobuf:"bytes,7,rep,name=headers" json:"headers,omitempty"`
}

func (*ProdRq) Descriptor added in v0.13.0

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

func (*ProdRq) GetAsyncMode added in v0.13.0

func (m *ProdRq) GetAsyncMode() bool

func (*ProdRq) GetCluster added in v0.13.0

func (m *ProdRq) GetCluster() string

func (*ProdRq) GetHeaders added in v0.16.0

func (m *ProdRq) GetHeaders() []*RecordHeader

func (*ProdRq) GetKeyUndefined added in v0.13.0

func (m *ProdRq) GetKeyUndefined() bool

func (*ProdRq) GetKeyValue added in v0.13.0

func (m *ProdRq) GetKeyValue() []byte

func (*ProdRq) GetMessage added in v0.13.0

func (m *ProdRq) GetMessage() []byte

func (*ProdRq) GetTopic added in v0.13.0

func (m *ProdRq) GetTopic() string

func (*ProdRq) ProtoMessage added in v0.13.0

func (*ProdRq) ProtoMessage()

func (*ProdRq) Reset added in v0.13.0

func (m *ProdRq) Reset()

func (*ProdRq) String added in v0.13.0

func (m *ProdRq) String() string

type ProdRs added in v0.13.0

type ProdRs struct {
	// Partition the message was written to. The value only makes sense if
	// ProdReq.async_mode was false.
	Partition int32 `protobuf:"varint,1,opt,name=partition" json:"partition,omitempty"`
	// Offset the message was written to. The value only makes sense if
	// ProdReq.async_mode was false.
	Offset int64 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"`
}

func (*ProdRs) Descriptor added in v0.13.0

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

func (*ProdRs) GetOffset added in v0.13.0

func (m *ProdRs) GetOffset() int64

func (*ProdRs) GetPartition added in v0.13.0

func (m *ProdRs) GetPartition() int32

func (*ProdRs) ProtoMessage added in v0.13.0

func (*ProdRs) ProtoMessage()

func (*ProdRs) Reset added in v0.13.0

func (m *ProdRs) Reset()

func (*ProdRs) String added in v0.13.0

func (m *ProdRs) String() string

type RecordHeader added in v0.16.0

type RecordHeader struct {
	// Key in the header key-value pair
	Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	// Value in the header key-value pair
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*RecordHeader) Descriptor added in v0.16.0

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

func (*RecordHeader) GetKey added in v0.16.0

func (m *RecordHeader) GetKey() string

func (*RecordHeader) GetValue added in v0.16.0

func (m *RecordHeader) GetValue() []byte

func (*RecordHeader) ProtoMessage added in v0.16.0

func (*RecordHeader) ProtoMessage()

func (*RecordHeader) Reset added in v0.16.0

func (m *RecordHeader) Reset()

func (*RecordHeader) String added in v0.16.0

func (m *RecordHeader) String() string

type SetOffsetsRq added in v0.15.0

type SetOffsetsRq struct {
	// Name of a Kafka cluster
	Cluster string `protobuf:"bytes,1,opt,name=cluster" json:"cluster,omitempty"`
	// Name of a topic
	Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
	// Name of a consumer group.
	Group   string             `protobuf:"bytes,3,opt,name=group" json:"group,omitempty"`
	Offsets []*PartitionOffset `protobuf:"bytes,4,rep,name=offsets" json:"offsets,omitempty"`
}

func (*SetOffsetsRq) Descriptor added in v0.15.0

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

func (*SetOffsetsRq) GetCluster added in v0.15.0

func (m *SetOffsetsRq) GetCluster() string

func (*SetOffsetsRq) GetGroup added in v0.15.0

func (m *SetOffsetsRq) GetGroup() string

func (*SetOffsetsRq) GetOffsets added in v0.15.0

func (m *SetOffsetsRq) GetOffsets() []*PartitionOffset

func (*SetOffsetsRq) GetTopic added in v0.15.0

func (m *SetOffsetsRq) GetTopic() string

func (*SetOffsetsRq) ProtoMessage added in v0.15.0

func (*SetOffsetsRq) ProtoMessage()

func (*SetOffsetsRq) Reset added in v0.15.0

func (m *SetOffsetsRq) Reset()

func (*SetOffsetsRq) String added in v0.15.0

func (m *SetOffsetsRq) String() string

type SetOffsetsRs added in v0.15.0

type SetOffsetsRs struct {
}

func (*SetOffsetsRs) Descriptor added in v0.15.0

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

func (*SetOffsetsRs) ProtoMessage added in v0.15.0

func (*SetOffsetsRs) ProtoMessage()

func (*SetOffsetsRs) Reset added in v0.15.0

func (m *SetOffsetsRs) Reset()

func (*SetOffsetsRs) String added in v0.15.0

func (m *SetOffsetsRs) String() string

Jump to

Keyboard shortcuts

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