node

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSON added in v1.0.0

type JSON struct {
	Name       string              `json:"name"`
	IsExternal bool                `json:"is_external"`
	Image      *string             `json:"image,omitempty"`
	Process    *Process            `json:"process,omitempty"`
	Listen     []string            `json:"listen"`
	Networks   []string            `json:"networks"`
	Tags       []string            `json:"tags"`
	Volumes    []*Volume           `json:"volumes"`
	Connected  map[string][]string `json:"connected"`
}

type Meta added in v1.4.0

type Meta struct {
	Info string
	Tags []string
}

type Node

type Node struct {
	ID       string
	Name     string
	Image    string
	Cluster  string
	Networks []string
	Meta     *Meta
	Process  *Process
	Volumes  []*Volume
	Ports    Ports
}

func (*Node) IsExternal

func (n *Node) IsExternal() bool

func (*Node) ToJSON added in v1.0.0

func (n *Node) ToJSON() (rv *JSON)

func (*Node) ToView added in v1.6.4

func (n *Node) ToView() (rv *View)

type Port

type Port struct {
	Kind  string `json:"kind"`
	Value int    `json:"value"`
}

func (*Port) ID added in v1.5.1

func (p *Port) ID() string

func (*Port) Label

func (p *Port) Label() string

type PortMatcher added in v1.6.4

type PortMatcher interface {
	HasAny(...string) bool
	Has(...string) bool
}

type Ports added in v1.0.0

type Ports []*Port

func (Ports) Dedup added in v1.0.0

func (ps Ports) Dedup() (rv Ports)

func (Ports) Has added in v1.6.4

func (ps Ports) Has(label ...string) (yes bool)

func (Ports) HasAny added in v1.6.4

func (ps Ports) HasAny(label ...string) (yes bool)

type Process added in v1.5.0

type Process struct {
	Cmd []string `json:"cmd"`
	Env []string `json:"env"`
}

type View added in v1.6.4

type View struct {
	Listen     PortMatcher
	Name       string
	Image      string
	Cmd        string
	Args       []string
	Tags       []string
	IsExternal bool
}

type Volume added in v1.5.0

type Volume struct {
	Type string `json:"type"`
	Src  string `json:"src"`
	Dst  string `json:"dst"`
}

Jump to

Keyboard shortcuts

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