util

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressFunc added in v1.0.0

func AddressFunc(getClient func() HAKeeperClient) func(context.Context, bool) (string, error)

func DumpConfig added in v1.1.0

func DumpConfig(cfg any, defCfg any) (map[string]*logservicepb.ConfigItem, error)

func Fastrand64

func Fastrand64() uint64

Fastrand64 returns a lock free uint64 value. Compared to rand.Int63(), this implementation scales.

func MergeConfig added in v1.1.0

func MergeConfig(dst *ConfigData, src map[string]*logservicepb.ConfigItem)

MergeConfig copy all items from src to dst and overwrite the existed item.

func SetUUIDNodeID

func SetUUIDNodeID(ctx context.Context, nodeUuid []byte) error

SetUUIDNodeID set all uuid generator's node_id

Types

type ConfigData added in v1.1.0

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

func NewConfigData added in v1.1.0

func NewConfigData(data map[string]*logservicepb.ConfigItem) *ConfigData

func (*ConfigData) DecrCount added in v1.1.0

func (cd *ConfigData) DecrCount()

func (*ConfigData) GetData added in v1.1.0

func (cd *ConfigData) GetData() *logservicepb.ConfigData

type HAKeeperClient added in v1.0.0

type HAKeeperClient interface {
	// GetClusterDetails queries the HAKeeper and return CN and TN nodes that are
	// known to the HAKeeper.
	GetClusterDetails(ctx context.Context) (pb.ClusterDetails, error)
}

HAKeeperClient is an interface which is mainly used to avoid cycle import.

type RunResult added in v1.0.0

type RunResult struct {
	AffectRows uint64
}

Directories

Path Synopsis
A common util to export data (trace and metric for now) as batch
A common util to export data (trace and metric for now) as batch
etl
example
Bin to show how Merge Task work.
Bin to show how Merge Task work.
A very simple fault injection tool.
A very simple fault injection tool.
v2

Jump to

Keyboard shortcuts

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