typredis

package
v0.8.19 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: MIT Imports: 9 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 {
	Host        string
	Port        string
	Password    string
	DockerName  string
	DockerImage string
}

Module of Redis

func New added in v0.8.15

func New() *Module

New Redis Module

func (*Module) BuildCommands added in v0.8.9

func (m *Module) BuildCommands(c *typcore.BuildContext) []*cli.Command

BuildCommands of module

func (*Module) Configure added in v0.8.9

func (m *Module) Configure(loader typcore.ConfigLoader) (prefix string, spec, loadFn interface{})

Configure Redis

func (*Module) Destroy added in v0.8.9

func (m *Module) Destroy() []interface{}

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() []interface{}

Prepare the module

func (*Module) Provide added in v0.8.9

func (m *Module) Provide() []interface{}

Provide dependencies

func (*Module) WithDockerImage added in v0.8.17

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

WithDockerImage to set docker image

func (*Module) WithDockerName added in v0.8.17

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

WithDockerName to set docker name

func (*Module) WithHost added in v0.8.17

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

WithHost to set host

func (*Module) WithPassword added in v0.8.17

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

WithPassword to set password

func (*Module) WithPort added in v0.8.17

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

WithPort to set port

Jump to

Keyboard shortcuts

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