contract

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BackoffPolicy_name = map[int32]string{
		0: "Exponential",
		1: "Linear",
	}
	BackoffPolicy_value = map[string]int32{
		"Exponential": 0,
		"Linear":      1,
	}
)

Enum value maps for BackoffPolicy.

View Source
var (
	DeliveryOrder_name = map[int32]string{
		0: "UNORDERED",
		1: "ORDERED",
	}
	DeliveryOrder_value = map[string]int32{
		"UNORDERED": 0,
		"ORDERED":   1,
	}
)

Enum value maps for DeliveryOrder.

View Source
var (
	ContentMode_name = map[int32]string{
		0: "BINARY",
		1: "STRUCTURED",
	}
	ContentMode_value = map[string]int32{
		"BINARY":     0,
		"STRUCTURED": 1,
	}
)

Enum value maps for ContentMode.

View Source
var File_contract_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BackoffPolicy added in v0.19.0

type BackoffPolicy int32

BackoffPolicyType is the type for backoff policies

const (
	// Exponential backoff policy
	BackoffPolicy_Exponential BackoffPolicy = 0
	// Linear backoff policy
	BackoffPolicy_Linear BackoffPolicy = 1
)

func (BackoffPolicy) Descriptor added in v0.19.0

func (BackoffPolicy) Enum added in v0.19.0

func (x BackoffPolicy) Enum() *BackoffPolicy

func (BackoffPolicy) EnumDescriptor deprecated added in v0.19.0

func (BackoffPolicy) EnumDescriptor() ([]byte, []int)

Deprecated: Use BackoffPolicy.Descriptor instead.

func (BackoffPolicy) Number added in v0.19.0

func (BackoffPolicy) String added in v0.19.0

func (x BackoffPolicy) String() string

func (BackoffPolicy) Type added in v0.19.0

type ContentMode

type ContentMode int32

CloudEvent content mode

const (
	ContentMode_BINARY     ContentMode = 0
	ContentMode_STRUCTURED ContentMode = 1
)

func (ContentMode) Descriptor

func (ContentMode) Enum

func (x ContentMode) Enum() *ContentMode

func (ContentMode) EnumDescriptor deprecated

func (ContentMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ContentMode.Descriptor instead.

func (ContentMode) Number

func (x ContentMode) Number() protoreflect.EnumNumber

func (ContentMode) String

func (x ContentMode) String() string

func (ContentMode) Type

type Contract

type Contract struct {

	// Count each contract update.
	// Make sure each data plane pod has the same contract generation number.
	Generation uint64      `protobuf:"varint,1,opt,name=generation,proto3" json:"generation,omitempty"`
	Resources  []*Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"`
	// contains filtered or unexported fields
}

func (*Contract) Descriptor deprecated

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

Deprecated: Use Contract.ProtoReflect.Descriptor instead.

func (*Contract) GetGeneration

func (x *Contract) GetGeneration() uint64

func (*Contract) GetResources

func (x *Contract) GetResources() []*Resource

func (*Contract) MarshalLogObject added in v0.24.0

func (x *Contract) MarshalLogObject(encoder zapcore.ObjectEncoder) error

func (*Contract) ProtoMessage

func (*Contract) ProtoMessage()

func (*Contract) ProtoReflect

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

func (*Contract) Reset

func (x *Contract) Reset()

func (*Contract) String

func (x *Contract) String() string

type DeliveryOrder added in v0.22.0

type DeliveryOrder int32

Check dev.knative.eventing.kafka.broker.dispatcher.consumer.DeliveryOrder for more details

const (
	DeliveryOrder_UNORDERED DeliveryOrder = 0
	DeliveryOrder_ORDERED   DeliveryOrder = 1
)

func (DeliveryOrder) Descriptor added in v0.22.0

func (DeliveryOrder) Enum added in v0.22.0

func (x DeliveryOrder) Enum() *DeliveryOrder

func (DeliveryOrder) EnumDescriptor deprecated added in v0.22.0

func (DeliveryOrder) EnumDescriptor() ([]byte, []int)

Deprecated: Use DeliveryOrder.Descriptor instead.

func (DeliveryOrder) Number added in v0.22.0

func (DeliveryOrder) String added in v0.22.0

func (x DeliveryOrder) String() string

func (DeliveryOrder) Type added in v0.22.0

type Egress

type Egress struct {

	// consumer group name
	ConsumerGroup string `protobuf:"bytes,1,opt,name=consumerGroup,proto3" json:"consumerGroup,omitempty"`
	// destination is the sink where events are sent.
	Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
	// Types that are assignable to ReplyStrategy:
	//	*Egress_ReplyUrl
	//	*Egress_ReplyToOriginalTopic
	ReplyStrategy isEgress_ReplyStrategy `protobuf_oneof:"replyStrategy"`
	Filter        *Filter                `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`
	// Id of the egress
	// It's the same as the Kubernetes resource uid
	Uid string `protobuf:"bytes,6,opt,name=uid,proto3" json:"uid,omitempty"`
	// Egress configuration.
	// It overrides Resource's EgressConfig.
	EgressConfig *EgressConfig `protobuf:"bytes,7,opt,name=egressConfig,proto3" json:"egressConfig,omitempty"`
	// Delivery guarantee to use
	// Empty defaults to unordered
	DeliveryOrder DeliveryOrder `protobuf:"varint,8,opt,name=deliveryOrder,proto3,enum=DeliveryOrder" json:"deliveryOrder,omitempty"`
	// contains filtered or unexported fields
}

func (*Egress) Descriptor deprecated

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

Deprecated: Use Egress.ProtoReflect.Descriptor instead.

func (*Egress) GetConsumerGroup

func (x *Egress) GetConsumerGroup() string

func (*Egress) GetDeliveryOrder added in v0.22.0

func (x *Egress) GetDeliveryOrder() DeliveryOrder

func (*Egress) GetDestination

func (x *Egress) GetDestination() string

func (*Egress) GetEgressConfig added in v0.21.0

func (x *Egress) GetEgressConfig() *EgressConfig

func (*Egress) GetFilter

func (x *Egress) GetFilter() *Filter

func (*Egress) GetReplyStrategy

func (m *Egress) GetReplyStrategy() isEgress_ReplyStrategy

func (*Egress) GetReplyToOriginalTopic

func (x *Egress) GetReplyToOriginalTopic() *Empty

func (*Egress) GetReplyUrl

func (x *Egress) GetReplyUrl() string

func (*Egress) GetUid added in v0.19.0

func (x *Egress) GetUid() string

func (*Egress) MarshalLogObject added in v0.24.0

func (x *Egress) MarshalLogObject(encoder zapcore.ObjectEncoder) error

func (*Egress) ProtoMessage

func (*Egress) ProtoMessage()

func (*Egress) ProtoReflect

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

func (*Egress) Reset

func (x *Egress) Reset()

func (*Egress) String

func (x *Egress) String() string

type EgressConfig

type EgressConfig struct {

	// Dead letter is where the event is sent when something goes wrong
	DeadLetter string `protobuf:"bytes,1,opt,name=deadLetter,proto3" json:"deadLetter,omitempty"`
	// retry is the minimum number of retries the sender should attempt when
	// sending an event before moving it to the dead letter sink.
	//
	// Setting retry to 0 means don't retry.
	Retry uint32 `protobuf:"varint,2,opt,name=retry,proto3" json:"retry,omitempty"`
	// backoffPolicy is the retry backoff policy (linear, exponential).
	BackoffPolicy BackoffPolicy `protobuf:"varint,3,opt,name=backoffPolicy,proto3,enum=BackoffPolicy" json:"backoffPolicy,omitempty"`
	// backoffDelay is the delay before retrying in milliseconds.
	BackoffDelay uint64 `protobuf:"varint,4,opt,name=backoffDelay,proto3" json:"backoffDelay,omitempty"`
	// timeout is the single request timeout (not the overall retry timeout)
	Timeout uint64 `protobuf:"varint,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*EgressConfig) Descriptor deprecated

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

Deprecated: Use EgressConfig.ProtoReflect.Descriptor instead.

func (*EgressConfig) GetBackoffDelay added in v0.19.0

func (x *EgressConfig) GetBackoffDelay() uint64

func (*EgressConfig) GetBackoffPolicy added in v0.19.0

func (x *EgressConfig) GetBackoffPolicy() BackoffPolicy

func (*EgressConfig) GetDeadLetter

func (x *EgressConfig) GetDeadLetter() string

func (*EgressConfig) GetRetry added in v0.19.0

func (x *EgressConfig) GetRetry() uint32

func (*EgressConfig) GetTimeout added in v0.24.0

func (x *EgressConfig) GetTimeout() uint64

func (*EgressConfig) MarshalLogObject added in v0.24.0

func (x *EgressConfig) MarshalLogObject(encoder zapcore.ObjectEncoder) error

func (*EgressConfig) ProtoMessage

func (*EgressConfig) ProtoMessage()

func (*EgressConfig) ProtoReflect

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

func (*EgressConfig) Reset

func (x *EgressConfig) Reset()

func (*EgressConfig) String

func (x *EgressConfig) String() string

type Egress_ReplyToOriginalTopic

type Egress_ReplyToOriginalTopic struct {
	// Send the response to a Kafka topic
	ReplyToOriginalTopic *Empty `protobuf:"bytes,4,opt,name=replyToOriginalTopic,proto3,oneof"`
}

type Egress_ReplyUrl

type Egress_ReplyUrl struct {
	// Send the response to an url
	ReplyUrl string `protobuf:"bytes,3,opt,name=replyUrl,proto3,oneof"`
}

type Empty added in v0.22.5

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

We don't use the google.protobuf.Empty type because configuring the include directory is a mess for the contributors and for the build scripts. Hence, more than dealing with contributors that can't get their dev environment working with the project, we prefer to have this additional single line of code. Protobuf include nightmare? No thanks!

func (*Empty) Descriptor deprecated added in v0.22.5

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage added in v0.22.5

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect added in v0.22.5

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

func (*Empty) Reset added in v0.22.5

func (x *Empty) Reset()

func (*Empty) String added in v0.22.5

func (x *Empty) String() string

type Filter

type Filter struct {

	// attributes filters events by exact match on event context attributes.
	// Each key in the map is compared with the equivalent key in the event
	// context. An event passes the filter if all values are equal to the
	// specified values.
	//
	// Nested context attributes are not supported as keys. Only string values are supported.
	Attributes map[string]string `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Filter) Descriptor deprecated

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

Deprecated: Use Filter.ProtoReflect.Descriptor instead.

func (*Filter) GetAttributes

func (x *Filter) GetAttributes() map[string]string

func (*Filter) MarshalLogObject added in v0.24.0

func (x *Filter) MarshalLogObject(encoder zapcore.ObjectEncoder) error

func (*Filter) ProtoMessage

func (*Filter) ProtoMessage()

func (*Filter) ProtoReflect

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

func (*Filter) Reset

func (x *Filter) Reset()

func (*Filter) String

func (x *Filter) String() string

type Ingress

type Ingress struct {

	// Optional content mode to use when pushing messages to Kafka
	ContentMode ContentMode `protobuf:"varint,1,opt,name=contentMode,proto3,enum=ContentMode" json:"contentMode,omitempty"`
	// Ingress can both listen on a specific HTTP path
	// or listen to the / path but match the Host header
	//
	// Types that are assignable to IngressType:
	//	*Ingress_Path
	//	*Ingress_Host
	IngressType isIngress_IngressType `protobuf_oneof:"ingressType"`
	// contains filtered or unexported fields
}

func (*Ingress) Descriptor deprecated

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

Deprecated: Use Ingress.ProtoReflect.Descriptor instead.

func (*Ingress) GetContentMode

func (x *Ingress) GetContentMode() ContentMode

func (*Ingress) GetHost

func (x *Ingress) GetHost() string

func (*Ingress) GetIngressType

func (m *Ingress) GetIngressType() isIngress_IngressType

func (*Ingress) GetPath

func (x *Ingress) GetPath() string

func (*Ingress) MarshalLogObject added in v0.24.0

func (x *Ingress) MarshalLogObject(encoder zapcore.ObjectEncoder) error

func (*Ingress) ProtoMessage

func (*Ingress) ProtoMessage()

func (*Ingress) ProtoReflect

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

func (*Ingress) Reset

func (x *Ingress) Reset()

func (*Ingress) String

func (x *Ingress) String() string

type Ingress_Host

type Ingress_Host struct {
	// host header to match
	Host string `protobuf:"bytes,3,opt,name=host,proto3,oneof"`
}

type Ingress_Path

type Ingress_Path struct {
	// path to listen for incoming events.
	Path string `protobuf:"bytes,2,opt,name=path,proto3,oneof"`
}

type Reference added in v0.21.0

type Reference struct {

	// Object id.
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// Object namespace.
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// Object name.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// Object version.
	Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

Kubernetes resource reference.

func (*Reference) Descriptor deprecated added in v0.21.0

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

Deprecated: Use Reference.ProtoReflect.Descriptor instead.

func (*Reference) GetName added in v0.21.0

func (x *Reference) GetName() string

func (*Reference) GetNamespace added in v0.21.0

func (x *Reference) GetNamespace() string

func (*Reference) GetUuid added in v0.21.0

func (x *Reference) GetUuid() string

func (*Reference) GetVersion added in v0.21.0

func (x *Reference) GetVersion() string

func (*Reference) ProtoMessage added in v0.21.0

func (*Reference) ProtoMessage()

func (*Reference) ProtoReflect added in v0.21.0

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

func (*Reference) Reset added in v0.21.0

func (x *Reference) Reset()

func (*Reference) String added in v0.21.0

func (x *Reference) String() string

type Resource

type Resource struct {

	// Id of the resource
	// It's the same as the Kubernetes resource uid
	Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	// Topics name
	// Note: If there is an ingress configured, then this field must have exactly 1 element otherwise,
	//  if the resource does just dispatch from Kafka, then this topic list can contain multiple elements
	Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"`
	// A comma separated list of host/port pairs to use for establishing the initial connection to the Kafka cluster.
	// Note: we're using a comma separated list simply because that's how java kafka client likes it.
	BootstrapServers string `protobuf:"bytes,3,opt,name=bootstrapServers,proto3" json:"bootstrapServers,omitempty"`
	// Optional ingress for this topic
	Ingress *Ingress `protobuf:"bytes,4,opt,name=ingress,proto3" json:"ingress,omitempty"`
	// Optional configuration of egress valid for the whole resource
	EgressConfig *EgressConfig `protobuf:"bytes,5,opt,name=egressConfig,proto3" json:"egressConfig,omitempty"`
	// Optional egresses for this topic
	Egresses []*Egress `protobuf:"bytes,6,rep,name=egresses,proto3" json:"egresses,omitempty"`
	// Types that are assignable to Auth:
	//	*Resource_AbsentAuth
	//	*Resource_AuthSecret
	Auth isResource_Auth `protobuf_oneof:"Auth"`
	// contains filtered or unexported fields
}

func (*Resource) Descriptor deprecated

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

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetAbsentAuth added in v0.21.0

func (x *Resource) GetAbsentAuth() *Empty

func (*Resource) GetAuth added in v0.21.0

func (m *Resource) GetAuth() isResource_Auth

func (*Resource) GetAuthSecret added in v0.21.0

func (x *Resource) GetAuthSecret() *Reference

func (*Resource) GetBootstrapServers

func (x *Resource) GetBootstrapServers() string

func (*Resource) GetEgressConfig

func (x *Resource) GetEgressConfig() *EgressConfig

func (*Resource) GetEgresses

func (x *Resource) GetEgresses() []*Egress

func (*Resource) GetIngress

func (x *Resource) GetIngress() *Ingress

func (*Resource) GetTopics

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

func (*Resource) GetUid added in v0.19.0

func (x *Resource) GetUid() string

func (*Resource) MarshalLogObject added in v0.24.0

func (x *Resource) MarshalLogObject(encoder zapcore.ObjectEncoder) error

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

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

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

type Resource_AbsentAuth added in v0.21.0

type Resource_AbsentAuth struct {
	// No auth configured.
	AbsentAuth *Empty `protobuf:"bytes,7,opt,name=absentAuth,proto3,oneof"`
}

type Resource_AuthSecret added in v0.21.0

type Resource_AuthSecret struct {
	// Secret reference.
	//
	// Secret format:
	//
	//   protocol: (PLAINTEXT | SASL_PLAINTEXT | SSL | SASL_SSL)
	//   sasl.mechanism: (SCRAM-SHA-256 | SCRAM-SHA-512)
	//   ca.crt: <CA PEM certificate>
	//   user.crt: <User PEM certificate>
	//   user.key: <User PEM key>
	//   user: <SASL username>
	//   password: <SASL password>
	//
	// Validation:
	//   - protocol=PLAINTEXT
	//   - protocol=SSL
	//     - required:
	//       - ca.crt
	//       - user.crt
	//       - user.key
	//   - protocol=SASL_PLAINTEXT
	//     - required:
	//       - sasl.mechanism
	//       - user
	//       - password
	//   - protocol=SASL_SSL
	//     - required:
	//       - sasl.mechanism
	//       - ca.crt
	//       - user.crt
	//       - user.key
	//       - user
	//       - password
	AuthSecret *Reference `protobuf:"bytes,8,opt,name=authSecret,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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