vanus

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyID = primitive.ErrEmptyID

Functions

func DestroySnowflake

func DestroySnowflake()

func InitFakeSnowflake

func InitFakeSnowflake()

InitFakeSnowflake just only used for Uint Test.

func InitSnowflake

func InitSnowflake(ctx context.Context, ctrlAddr []string, n *node) error

InitSnowflake refactor in the future.

func NewNode

func NewNode(svc Service, id uint16) *node

Types

type ID

type ID = primitive.ID

func EmptyID

func EmptyID() ID

func NewID

func NewID() (ID, error)

func NewIDFromString

func NewIDFromString(id string) (ID, error)

func NewIDFromUint64

func NewIDFromUint64(id uint64) ID

func NewTestID

func NewTestID() ID

NewTestID only used for Uint Test.

type IDList

type IDList []ID

func (IDList) Contains

func (l IDList) Contains(id ID) bool

type Service

type Service int
const (
	ControllerService Service = iota
	StoreService
	UnknownService
)

func (Service) Name

func (s Service) Name() string

Jump to

Keyboard shortcuts

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