storage

package
v0.0.0-...-c8dc130 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdHolder

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

func NewEtcdHolder

func NewEtcdHolder(ctx context.Context, ip, port string, endpoints []string, table string, maxId int64) (*EtcdHolder, error)

func (*EtcdHolder) Close

func (e *EtcdHolder) Close(ctx context.Context) error

func (*EtcdHolder) GetWorkerId

func (e *EtcdHolder) GetWorkerId(ctx context.Context) (int64, error)

type Locker

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

func NewLocker

func NewLocker(ctx context.Context, path string, endpoints []string) (*Locker, error)

func (*Locker) Lock

func (l *Locker) Lock(ctx context.Context) error

func (*Locker) UnLock

func (l *Locker) UnLock(ctx context.Context) error

type MySQL

type MySQL struct {
	*sqlx.DB
	// contains filtered or unexported fields
}

func NewMySQL

func NewMySQL(ctx context.Context, conf *utils.Config) (*MySQL, error)

func (*MySQL) Close

func (m *MySQL) Close(ctx context.Context)

func (*MySQL) GetAllTags

func (m *MySQL) GetAllTags(ctx context.Context) ([]string, error)

func (*MySQL) UpdateMaxIdAndGetLeafAlloc

func (m *MySQL) UpdateMaxIdAndGetLeafAlloc(ctx context.Context, tag string) (*utils.LeafAlloc, error)

Jump to

Keyboard shortcuts

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