redis

package
v0.0.0-...-9901557 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChannelWriteStatDone = "write_stat_done"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(settings *Config) *redis.Client

Types

type Config

type Config struct {
	RedisPort     int    `envconfig:"redis_port" default:"6379"`
	RedisHost     string `envconfig:"redis_host" default:"127.0.0.1"`
	RedisPoolSize int    `envconfig:"redis_pool_size" default:"10"`
}

func Init

func Init() *Config

type Service

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

func NewService

func NewService(settings *Config) (*Service, error)

func (*Service) Publish

func (s *Service) Publish(source string, message interface{}) error

func (*Service) StoreStatistic

func (s *Service) StoreStatistic(statList []model.CryptoStatistic) error

func (*Service) Test

func (s *Service) Test() error

Jump to

Keyboard shortcuts

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