actor

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

README

fiber actor

Auto initializers with configuration for fiber.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisClient

type RedisClient interface {
	redis.Cmdable
	Close() error
}

Type definition for redis client which should implement close func.

type RedisProperty

type RedisProperty struct {
	// host:port address
	Address string `fiber:"address"`

	// password for redis if existed
	Password string `fiber:"password"`

	// the db to select after connected
	Db int `fiber:"db"`

	PoolConfig struct {
		Size    int `fiber:"size"`
		MinIdle int `fiber:"min_idle"`
	} `fiber:"pool"`

	// use sentinel mode or not, default false
	SentinelConfig struct {
		Master string   `fiber:"master"`
		Nodes  []string `fiber:"nodes"`
	} `fiber:"sentinel"`

	ClusterConfig struct {
		// A seed list of host:port addresses of cluster unresolvedNodes.
		Nodes        []string `fiber:"nodes"`
		MaxRedirects int      `fiber:"max_redirects"`
	} `fiber:"cluster"`
}

RedisProperty defines the property of fiber.redis section in yaml config.

func (*RedisProperty) Prefix

func (*RedisProperty) Prefix() string

type Scheduler

type Scheduler interface {
	// Cron returns the cron expression string.
	Cron() string

	// Schedule starts this scheduler task.
	Schedule()
}

Scheduler represents cron task scheduler which will be scheduled with the cron expression. Check https://godoc.org/github.com/robfig/cron to see the cron expression.

Jump to

Keyboard shortcuts

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