Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvNameKafkaBrokers string = "BLUDGEON_KAFKA_BROKERS" EnvNameKafkaClientId string = "BLUDGEON_KAFKA_CLIENT_ID" EnvNameKafkaGroupId string = "BLUDGEON_KAFKA_GROUP_ID" EnvNameKafkaConsumerGroup string = "BLUDGEON_KAFKA_CONSUMER_GROUP" EnvNameKafkaEnableLog string = "BLUDGEON_KAFKA_ENABLE_LOG" )
View Source
const ( NoBrokersConfigured string = "no brokers configured" NoClientIdConfigured string = "no client id configured" NoGroupIdConfigured string = "no group id configured" )
View Source
const (
ConfigNil string = "config is nil"
)
Variables ¶
View Source
var ( ErrNoBrokersConfigured = errors.New(NoBrokersConfigured) ErrNoClientIdConfigured = errors.New(NoClientIdConfigured) ErrNoGroupIdConfigured = errors.New(NoGroupIdConfigured) )
View Source
var ErrConfigNil = errors.New(ConfigNil)
Functions ¶
func New ¶
func New() interface { internal.Configurer internal.Initializer internal.Parameterizer Client }
Types ¶
type Configuration ¶
type Configuration struct { Brokers []string `json:"brokers"` ClientId string `json:"client_id"` GroupId string `json:"group_id"` EnableLog bool `json:"enable_log"` ConsumerGroup bool `json:"consumer_group"` }
func (*Configuration) Default ¶
func (c *Configuration) Default()
func (*Configuration) FromEnv ¶
func (c *Configuration) FromEnv(envs map[string]string)
func (*Configuration) Validate ¶
func (c *Configuration) Validate() error
Click to show internal directories.
Click to hide internal directories.