typredis

package
v0.8.23 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string `required:"true" default:"localhost"`
	Port     string `required:"true" default:"6379"`
	Password string `default:"redispass"`
	DB       int    `default:"0"`

	PoolSize           int           `envconfig:"POOL_SIZE"  default:"20" required:"true"`
	DialTimeout        time.Duration `envconfig:"DIAL_TIMEOUT" default:"5s" required:"true"`
	ReadWriteTimeout   time.Duration `envconfig:"READ_WRITE_TIMEOUT" default:"3s" required:"true"`
	IdleTimeout        time.Duration `envconfig:"IDLE_TIMEOUT" default:"5m" required:"true"`
	IdleCheckFrequency time.Duration `envconfig:"IDLE_CHECK_FREQUENCY" default:"1m" required:"true"`
	MaxConnAge         time.Duration `envconfig:"MAX_CONN_AGE" default:"30m" required:"true"`
}

Config is Redis Configuration

type Module

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

Module of Redis

func New added in v0.8.15

func New() *Module

New instance of redis module

func (*Module) Configure added in v0.8.9

func (m *Module) Configure() *typcore.Configuration

Configure Redis

func (*Module) Destroy added in v0.8.9

func (m *Module) Destroy() []*typdep.Invocation

Destroy dependencies

func (*Module) DockerCompose added in v0.8.9

func (m *Module) DockerCompose(version typdocker.Version) *typdocker.ComposeObject

DockerCompose template

func (*Module) Prepare added in v0.8.9

func (m *Module) Prepare() []*typdep.Invocation

Prepare the module

func (*Module) Provide added in v0.8.9

func (m *Module) Provide() []*typdep.Constructor

Provide dependencies

func (*Module) WithHost added in v0.8.17

func (m *Module) WithHost(host string) *Module

WithHost to return module with new host

func (*Module) WithPort added in v0.8.17

func (m *Module) WithPort(port string) *Module

WithPort to return module with new port

func (*Module) WithPrefix added in v0.8.23

func (m *Module) WithPrefix(prefix string) *Module

WithPrefix to return module with new prefix

func (*Module) WithdockerImage added in v0.8.23

func (m *Module) WithdockerImage(dockerImage string) *Module

WithdockerImage to return module with new docker image

func (*Module) WithdockerName added in v0.8.23

func (m *Module) WithdockerName(dockerName string) *Module

WithdockerName to return module with new docker name

func (*Module) Withpassword added in v0.8.23

func (m *Module) Withpassword(password string) *Module

Withpassword to return module with new password

Jump to

Keyboard shortcuts

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