knotx

package
v0.0.0-...-563cc57 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBufferSize        = 1024
	Genesis       string = "0"
	HeadRange     int64  = 5
	TailRange     string = "6"

	GenesisPrefix = "G"
	HeadPrefix    = "H"
	TailPrefix    = "T"

	GenesisKey = GenesisPrefix + Genesis
	TailKey    = TailPrefix + TailRange
)

Variables

This section is empty.

Functions

func Close

func Close()

func GetGenesisKey

func GetGenesisKey() string

func GetKnotKey

func GetKnotKey(knotIdx int64) string

func GetTailKey

func GetTailKey() string

Types

type ChainX

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

func NewChainX

func NewChainX(vnID vn.ID, chain bk.Chain) (*ChainX, *errors.Error)

func (*ChainX) Append

func (c *ChainX) Append(tie *bk.Tie) *errors.Error

func (*ChainX) GetChain

func (c *ChainX) GetChain() bk.Chain

func (*ChainX) GetTailKnotBID

func (c *ChainX) GetTailKnotBID() bk.BID

func (*ChainX) GetTailKnotIDX

func (c *ChainX) GetTailKnotIDX() bk.KnotIDX

func (*ChainX) Start

func (c *ChainX) Start()

func (*ChainX) SyncChain

func (c *ChainX) SyncChain() *errors.Error

type Job

type Job struct {
	Tie    *bk.Tie
	Status JobStatus
}

type JobStatus

type JobStatus int
const (
	Submitted JobStatus = 0
	Confirmed JobStatus = 1
	Failed    JobStatus = -1
)

Jump to

Keyboard shortcuts

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