confluent

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_client_confluent_conf_proto protoreflect.FileDescriptor

Functions

func MustNewPusher

func MustNewPusher(c *ProducerConf) queue.Pusher

func MustNewQueue

func MustNewQueue(c *ConsumerConf, handler queue.ConsumeHandler) queue.MessageQueue

func NewPusher

func NewPusher(c *ProducerConf) (queue.Pusher, error)

func NewQueue

func NewQueue(c *ConsumerConf, handler queue.ConsumeHandler) (queue.MessageQueue, error)

func WrapError

func WrapError(err error) error

Types

type ConsumerConf added in v0.0.2

type ConsumerConf struct {
	BootstrapServers string   `protobuf:"bytes,1,opt,name=bootstrapServers,proto3" json:"bootstrapServers,omitempty"`
	SecurityProtocol string   `protobuf:"bytes,2,opt,name=securityProtocol,proto3" json:"securityProtocol,omitempty"` //plaintext, ssl, sasl_plaintext, sasl_ssl
	Sasl             *SASL    `protobuf:"bytes,3,opt,name=sasl,proto3" json:"sasl,omitempty"`
	Ssl              *SSL     `protobuf:"bytes,4,opt,name=ssl,proto3" json:"ssl,omitempty"`
	Group            string   `protobuf:"bytes,5,opt,name=group,proto3" json:"group,omitempty"`
	Topics           []string `protobuf:"bytes,6,rep,name=topics,proto3" json:"topics,omitempty"`
	// contains filtered or unexported fields
}

func (*ConsumerConf) Descriptor deprecated added in v0.0.2

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

Deprecated: Use ConsumerConf.ProtoReflect.Descriptor instead.

func (*ConsumerConf) GetBootstrapServers added in v0.0.2

func (x *ConsumerConf) GetBootstrapServers() string

func (*ConsumerConf) GetGroup added in v0.0.2

func (x *ConsumerConf) GetGroup() string

func (*ConsumerConf) GetSasl added in v0.0.2

func (x *ConsumerConf) GetSasl() *SASL

func (*ConsumerConf) GetSecurityProtocol added in v0.0.2

func (x *ConsumerConf) GetSecurityProtocol() string

func (*ConsumerConf) GetSsl added in v0.0.2

func (x *ConsumerConf) GetSsl() *SSL

func (*ConsumerConf) GetTopics added in v0.0.2

func (x *ConsumerConf) GetTopics() []string

func (*ConsumerConf) ProtoMessage added in v0.0.2

func (*ConsumerConf) ProtoMessage()

func (*ConsumerConf) ProtoReflect added in v0.0.2

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

func (*ConsumerConf) Reset added in v0.0.2

func (x *ConsumerConf) Reset()

func (*ConsumerConf) String added in v0.0.2

func (x *ConsumerConf) String() string

func (*ConsumerConf) Validate added in v0.0.2

func (m *ConsumerConf) Validate() error

Validate checks the field values on ConsumerConf with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ConsumerConf) ValidateAll added in v0.0.2

func (m *ConsumerConf) ValidateAll() error

ValidateAll checks the field values on ConsumerConf with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConsumerConfMultiError, or nil if none found.

type ConsumerConfMultiError added in v0.0.2

type ConsumerConfMultiError []error

ConsumerConfMultiError is an error wrapping multiple validation errors returned by ConsumerConf.ValidateAll() if the designated constraints aren't met.

func (ConsumerConfMultiError) AllErrors added in v0.0.2

func (m ConsumerConfMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConsumerConfMultiError) Error added in v0.0.2

func (m ConsumerConfMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ConsumerConfValidationError added in v0.0.2

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

ConsumerConfValidationError is the validation error returned by ConsumerConf.Validate if the designated constraints aren't met.

func (ConsumerConfValidationError) Cause added in v0.0.2

Cause function returns cause value.

func (ConsumerConfValidationError) Error added in v0.0.2

Error satisfies the builtin error interface

func (ConsumerConfValidationError) ErrorName added in v0.0.2

func (e ConsumerConfValidationError) ErrorName() string

ErrorName returns error name.

func (ConsumerConfValidationError) Field added in v0.0.2

Field function returns field value.

func (ConsumerConfValidationError) Key added in v0.0.2

Key function returns key value.

func (ConsumerConfValidationError) Reason added in v0.0.2

Reason function returns reason value.

type KafkaMessageTextMapCarrier

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

func (*KafkaMessageTextMapCarrier) Get

func (carrier *KafkaMessageTextMapCarrier) Get(key string) string

Get returns the value associated with the passed key.

func (*KafkaMessageTextMapCarrier) Keys

func (carrier *KafkaMessageTextMapCarrier) Keys() []string

Keys lists the keys stored in this carrier.

func (*KafkaMessageTextMapCarrier) Set

func (carrier *KafkaMessageTextMapCarrier) Set(key string, value string)

Set stores the key-value pair.

type KafkaProducer

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

KafkaProducer 生产者

func (*KafkaProducer) Close

func (p *KafkaProducer) Close() error

func (*KafkaProducer) Name

func (p *KafkaProducer) Name() string

func (*KafkaProducer) Push

func (p *KafkaProducer) Push(ctx context.Context, topic string, key, value []byte) error

type ProducerConf added in v0.0.2

type ProducerConf struct {
	BootstrapServers    string `protobuf:"bytes,1,opt,name=bootstrapServers,proto3" json:"bootstrapServers,omitempty"`
	SecurityProtocol    string `protobuf:"bytes,2,opt,name=securityProtocol,proto3" json:"securityProtocol,omitempty"` //plaintext, ssl, sasl_plaintext, sasl_ssl
	Sasl                *SASL  `protobuf:"bytes,3,opt,name=sasl,proto3" json:"sasl,omitempty"`
	Ssl                 *SSL   `protobuf:"bytes,4,opt,name=ssl,proto3" json:"ssl,omitempty"`
	RequestRequiredAcks int32  `protobuf:"varint,5,opt,name=request_required_acks,json=requestRequiredAcks,proto3" json:"request_required_acks,omitempty"`
	Acks                int32  `protobuf:"varint,6,opt,name=acks,proto3" json:"acks,omitempty"`
	Partitioner         string `protobuf:"bytes,7,opt,name=partitioner,proto3" json:"partitioner,omitempty"`
	RequestTimeoutMs    int32  `protobuf:"varint,8,opt,name=request_timeout_ms,json=requestTimeoutMs,proto3" json:"request_timeout_ms,omitempty"`
	Group               string `protobuf:"bytes,9,opt,name=group,proto3" json:"group,omitempty"`
	Topic               string `protobuf:"bytes,10,opt,name=topic,proto3" json:"topic,omitempty"`
	// contains filtered or unexported fields
}

func (*ProducerConf) Descriptor deprecated added in v0.0.2

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

Deprecated: Use ProducerConf.ProtoReflect.Descriptor instead.

func (*ProducerConf) GetAcks added in v0.0.2

func (x *ProducerConf) GetAcks() int32

func (*ProducerConf) GetBootstrapServers added in v0.0.2

func (x *ProducerConf) GetBootstrapServers() string

func (*ProducerConf) GetGroup added in v0.0.6

func (x *ProducerConf) GetGroup() string

func (*ProducerConf) GetPartitioner added in v0.0.2

func (x *ProducerConf) GetPartitioner() string

func (*ProducerConf) GetRequestRequiredAcks added in v0.0.2

func (x *ProducerConf) GetRequestRequiredAcks() int32

func (*ProducerConf) GetRequestTimeoutMs added in v0.0.2

func (x *ProducerConf) GetRequestTimeoutMs() int32

func (*ProducerConf) GetSasl added in v0.0.2

func (x *ProducerConf) GetSasl() *SASL

func (*ProducerConf) GetSecurityProtocol added in v0.0.2

func (x *ProducerConf) GetSecurityProtocol() string

func (*ProducerConf) GetSsl added in v0.0.2

func (x *ProducerConf) GetSsl() *SSL

func (*ProducerConf) GetTopic added in v0.0.2

func (x *ProducerConf) GetTopic() string

func (*ProducerConf) ProtoMessage added in v0.0.2

func (*ProducerConf) ProtoMessage()

func (*ProducerConf) ProtoReflect added in v0.0.2

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

func (*ProducerConf) Reset added in v0.0.2

func (x *ProducerConf) Reset()

func (*ProducerConf) String added in v0.0.2

func (x *ProducerConf) String() string

func (*ProducerConf) Validate added in v0.0.2

func (m *ProducerConf) Validate() error

Validate checks the field values on ProducerConf with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ProducerConf) ValidateAll added in v0.0.2

func (m *ProducerConf) ValidateAll() error

ValidateAll checks the field values on ProducerConf with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ProducerConfMultiError, or nil if none found.

type ProducerConfMultiError added in v0.0.2

type ProducerConfMultiError []error

ProducerConfMultiError is an error wrapping multiple validation errors returned by ProducerConf.ValidateAll() if the designated constraints aren't met.

func (ProducerConfMultiError) AllErrors added in v0.0.2

func (m ProducerConfMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ProducerConfMultiError) Error added in v0.0.2

func (m ProducerConfMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ProducerConfValidationError added in v0.0.2

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

ProducerConfValidationError is the validation error returned by ProducerConf.Validate if the designated constraints aren't met.

func (ProducerConfValidationError) Cause added in v0.0.2

Cause function returns cause value.

func (ProducerConfValidationError) Error added in v0.0.2

Error satisfies the builtin error interface

func (ProducerConfValidationError) ErrorName added in v0.0.2

func (e ProducerConfValidationError) ErrorName() string

ErrorName returns error name.

func (ProducerConfValidationError) Field added in v0.0.2

Field function returns field value.

func (ProducerConfValidationError) Key added in v0.0.2

Key function returns key value.

func (ProducerConfValidationError) Reason added in v0.0.2

Reason function returns reason value.

type SASL

type SASL struct {
	Mechanisms string `protobuf:"bytes,1,opt,name=mechanisms,proto3" json:"mechanisms,omitempty"`
	User       string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	Password   string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*SASL) Descriptor deprecated

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

Deprecated: Use SASL.ProtoReflect.Descriptor instead.

func (*SASL) GetMechanisms

func (x *SASL) GetMechanisms() string

func (*SASL) GetPassword

func (x *SASL) GetPassword() string

func (*SASL) GetUser

func (x *SASL) GetUser() string

func (*SASL) ProtoMessage

func (*SASL) ProtoMessage()

func (*SASL) ProtoReflect

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

func (*SASL) Reset

func (x *SASL) Reset()

func (*SASL) String

func (x *SASL) String() string

func (*SASL) Validate

func (m *SASL) Validate() error

Validate checks the field values on SASL with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SASL) ValidateAll added in v0.0.2

func (m *SASL) ValidateAll() error

ValidateAll checks the field values on SASL with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SASLMultiError, or nil if none found.

type SASLMultiError added in v0.0.2

type SASLMultiError []error

SASLMultiError is an error wrapping multiple validation errors returned by SASL.ValidateAll() if the designated constraints aren't met.

func (SASLMultiError) AllErrors added in v0.0.2

func (m SASLMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SASLMultiError) Error added in v0.0.2

func (m SASLMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SASLValidationError

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

SASLValidationError is the validation error returned by SASL.Validate if the designated constraints aren't met.

func (SASLValidationError) Cause

func (e SASLValidationError) Cause() error

Cause function returns cause value.

func (SASLValidationError) Error

func (e SASLValidationError) Error() string

Error satisfies the builtin error interface

func (SASLValidationError) ErrorName

func (e SASLValidationError) ErrorName() string

ErrorName returns error name.

func (SASLValidationError) Field

func (e SASLValidationError) Field() string

Field function returns field value.

func (SASLValidationError) Key

func (e SASLValidationError) Key() bool

Key function returns key value.

func (SASLValidationError) Reason

func (e SASLValidationError) Reason() string

Reason function returns reason value.

type SSL

type SSL struct {
	CaLocation string `protobuf:"bytes,1,opt,name=caLocation,proto3" json:"caLocation,omitempty"`
	CaPem      string `protobuf:"bytes,2,opt,name=caPem,proto3" json:"caPem,omitempty"`
	// contains filtered or unexported fields
}

func (*SSL) Descriptor deprecated

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

Deprecated: Use SSL.ProtoReflect.Descriptor instead.

func (*SSL) GetCaLocation

func (x *SSL) GetCaLocation() string

func (*SSL) GetCaPem

func (x *SSL) GetCaPem() string

func (*SSL) ProtoMessage

func (*SSL) ProtoMessage()

func (*SSL) ProtoReflect

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

func (*SSL) Reset

func (x *SSL) Reset()

func (*SSL) String

func (x *SSL) String() string

func (*SSL) Validate

func (m *SSL) Validate() error

Validate checks the field values on SSL with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SSL) ValidateAll added in v0.0.2

func (m *SSL) ValidateAll() error

ValidateAll checks the field values on SSL with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SSLMultiError, or nil if none found.

type SSLMultiError added in v0.0.2

type SSLMultiError []error

SSLMultiError is an error wrapping multiple validation errors returned by SSL.ValidateAll() if the designated constraints aren't met.

func (SSLMultiError) AllErrors added in v0.0.2

func (m SSLMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SSLMultiError) Error added in v0.0.2

func (m SSLMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SSLValidationError

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

SSLValidationError is the validation error returned by SSL.Validate if the designated constraints aren't met.

func (SSLValidationError) Cause

func (e SSLValidationError) Cause() error

Cause function returns cause value.

func (SSLValidationError) Error

func (e SSLValidationError) Error() string

Error satisfies the builtin error interface

func (SSLValidationError) ErrorName

func (e SSLValidationError) ErrorName() string

ErrorName returns error name.

func (SSLValidationError) Field

func (e SSLValidationError) Field() string

Field function returns field value.

func (SSLValidationError) Key

func (e SSLValidationError) Key() bool

Key function returns key value.

func (SSLValidationError) Reason

func (e SSLValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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