github.com/argoproj/argo-events@v1.9.1/pkg/apis/eventbus/v1alpha1/kafka_eventbus.go (about)

     1  package v1alpha1
     2  
     3  import (
     4  	apicommon "github.com/argoproj/argo-events/pkg/apis/common"
     5  )
     6  
     7  // KafkaBus holds the KafkaBus EventBus information
     8  type KafkaBus struct {
     9  	// URL to kafka cluster, multiple URLs separated by comma
    10  	URL string `json:"url,omitempty" protobuf:"bytes,1,opt,name=url"`
    11  	// Topic name, defaults to {namespace_name}-{eventbus_name}
    12  	// +optional
    13  	Topic string `json:"topic,omitempty" protobuf:"bytes,2,opt,name=topic"`
    14  	// Kafka version, sarama defaults to the oldest supported stable version
    15  	// +optional
    16  	Version string `json:"version,omitempty" protobuf:"bytes,3,opt,name=version"`
    17  	// TLS configuration for the kafka client.
    18  	// +optional
    19  	TLS *apicommon.TLSConfig `json:"tls,omitempty" protobuf:"bytes,4,opt,name=tls"`
    20  	// SASL configuration for the kafka client
    21  	// +optional
    22  	SASL *apicommon.SASLConfig `json:"sasl,omitempty" protobuf:"bytes,5,opt,name=sasl"`
    23  	// Consumer group for kafka client
    24  	// +optional
    25  	ConsumerGroup *KafkaConsumerGroup `json:"consumerGroup,omitempty" protobuf:"bytes,6,opt,name=consumerGroup"`
    26  }
    27  
    28  type KafkaConsumerGroup struct {
    29  	// Consumer group name, defaults to {namespace_name}-{sensor_name}
    30  	// +optional
    31  	GroupName string `json:"groupName,omitempty" protobuf:"bytes,1,opt,name=groupName"`
    32  	// Rebalance strategy can be one of: sticky, roundrobin, range. Range is the default.
    33  	// +optional
    34  	RebalanceStrategy string `json:"rebalanceStrategy,omitempty" protobuf:"bytes,2,opt,name=rebalanceStrategy"`
    35  	// When starting up a new group do we want to start from the oldest event (true) or the newest event (false), defaults to false
    36  	// +optional
    37  	StartOldest bool `json:"startOldest,omitempty" default:"false" protobuf:"bytes,3,opt,name=startOldest"`
    38  }