redis

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"`
	TLSCertificate   string `help:"TLS Certificate to connect to Redis." env:"TLS_CERTIFICATE"`
	TLSKey           string `help:"TLS Certificate key to connect to Redis." env:"TLS_KEY"`
	TLSCACertificate string `help:"CA Certificate to connect to Redis." name:"tls-ca-certificate" env:"TLS_CA_CERTIFICATE"`

	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"`
	TrackingIDEnabled bool `help:"Enables adding Redis ID as a CloudEvent attribute." env:"TRACKING_ID_ENABLED" default:"false"`
}

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