clients

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrReviewFailed = errors.New("review key already exists")
View Source
var ReadDBCli *gorm.DB
View Source
var WriteDBCli *gorm.DB

Functions

func GetSqlDriver

func GetSqlDriver(dbConf config.DBConfig) (*gorm.DB, error)

func InitDBClients

func InitDBClients()

func MustInit added in v0.2.1

func MustInit()

Types

type EtcdClient

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

func NewEtcdClient

func NewEtcdClient(config *config.EtcdConfig) (*EtcdClient, error)

func (*EtcdClient) GetConfig

func (e *EtcdClient) GetConfig(group, dataId string) (string, error)

func (*EtcdClient) PublishConfig

func (e *EtcdClient) PublishConfig(group, dataId, content string) error

func (*EtcdClient) SyncRun

func (e *EtcdClient) SyncRun(TTL int, key string, job func() error) error

Jump to

Keyboard shortcuts

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