redis

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackendIDAttribute = "triggermeshbackendid"
)

Variables

This section is empty.

Functions

func New

func New(args *RedisArgs, logger *zap.SugaredLogger) backend.Interface

Types

type RedisArgs

type RedisArgs struct {
	Address          string   `help:"Redis address." env:"ADDRESS" default:"0.0.0.0:6379"`
	ClusterAddresses []string `help:"Redis address." env:"CLUSTER_ADDRESSES"`

	Username      string `help:"Redis username." env:"USERNAME"`
	Password      string `help:"Redis password." env:"PASSWORD"`
	Database      int    `help:"Database ordinal at Redis." env:"DATABASE" default:"0"`
	TLSEnabled    bool   `help:"TLS enablement for Redis connection." env:"TLS_ENABLED" default:"false"`
	TLSSkipVerify bool   `help:"TLS skipping certificate verification." env:"TLS_SKIP_VERIFY" default:"false"`

	Stream string `help:"Stream name that stores the broker's CloudEvents." env:"STREAM" default:"triggermesh"`
	Group  string `help:"Redis stream consumer group name." env:"GROUP" default:"default"`
	// Instance at the Redis stream consumer group. Copied from the InstanceName at the global args.
	Instance string `kong:"-"`

	StreamMaxLen int `help:"Limit the number of items in a stream by trimming it. Set to 0 for unlimited." env:"STREAM_MAX_LEN" default:"1000"`
}

func (*RedisArgs) Validate added in v1.1.0

func (ra *RedisArgs) Validate() error

Jump to

Keyboard shortcuts

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