line

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAndStart

func BuildAndStart(add dot.BuildNewer) (l dot.Line, err error)

BuildAndStart Construct line and call create rely create dots start add will be called before reply, after create

func BuildAndStartBy

func BuildAndStartBy(builder *dot.Builder) (l dot.Line, err error)

BuildAndStartBy Construct line and call create rely create dots start

func StopAndDestroy

func StopAndDestroy(l dot.Line, ignore bool)

StopAndDestroy stop and destroy

Types

type Lives

type Lives struct {
	// typeIDMap map[dot.TypeID][]*dot.Live
	LiveIDMap map[dot.LiveID]*dot.Live
}

Lives lives of dot

func NewLives

func NewLives() *Lives

NewLives new lives

func (*Lives) Add

func (ms *Lives) Add(m *dot.Live) error

Add add live

func (*Lives) Get

func (ms *Lives) Get(liveID dot.LiveID) (meta *dot.Live, err error)

Get get dot by live id

func (*Lives) RemoveByID added in v0.2.0

func (ms *Lives) RemoveByID(id dot.LiveID) error

RemoveByID remove the dot by live id

func (*Lives) UpdateOrAdd

func (ms *Lives) UpdateOrAdd(m *dot.Live) error

UpdateOrAdd if the live exist then update, or add it

type Metas

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

Metas metas of dot

func NewMetas

func NewMetas() *Metas

NewMetas new metas

func (*Metas) Add

func (ms *Metas) Add(m *dot.Metadata) error

Add add meta data to metas

func (*Metas) Get

func (ms *Metas) Get(typeID dot.TypeID) (meta *dot.Metadata, err error)

Get get meta by type id

func (*Metas) NewDot

func (ms *Metas) NewDot(t dot.TypeID) (dot dot.Dot, err error)

NewDot new dot

func (*Metas) RemoveByID added in v0.2.0

func (ms *Metas) RemoveByID(typeID dot.TypeID) error

RemoveByID remove meta data from metas

func (*Metas) UpdateOrAdd

func (ms *Metas) UpdateOrAdd(m *dot.Metadata) error

UpdateOrAdd if the meta exist then update, or add it

Jump to

Keyboard shortcuts

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