core

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigPush

func ConfigPush(nodes []Node, spec *spec.Spec, filename string) error

func CronDisable

func CronDisable(nodes []Node, spec *spec.Spec, keys []string) error

func CronEnable

func CronEnable(nodes []Node, spec *spec.Spec, keys []string) error

func CronStatus added in v0.9.0

func CronStatus(nodes []Node, spec *spec.Spec, keys []string) error

func Deploy

func Deploy(nodes []Node, spec *spec.Spec, rel *Release) error

func Df added in v0.11.0

func Df(nodes []Node, spec *spec.Spec) error

func Forward added in v0.10.0

func Forward(nodes []Node, spec *spec.Spec, port string) error

func Log added in v0.9.0

func Log(nodes []Node, spec *spec.Spec, key string, no int) error

func Prune

func Prune(nodes []Node, spec *spec.Spec) error

func Restart

func Restart(nodes []Node, spec *spec.Spec) error

func Run

func Run(nodes []Node, spec *spec.Spec, key string) error

func Scale

func Scale(nodes []Node, spec *spec.Spec, comp *Composition) error

func Setup

func Setup(nodes []Node, spec *spec.Spec, config string) error

func Status

func Status(nodes []Node, spec *spec.Spec) error

func Top added in v0.12.0

func Top(node Node, spec *spec.Spec) error

Types

type Composition

type Composition struct {
	Sizes map[string]int
}

func DefaultComposition added in v0.10.0

func DefaultComposition(n Node, spec *spec.Spec) (*Composition, error)

func NewComposition

func NewComposition(args []string) (*Composition, error)

type Node

type Node struct {
	Name string
	Host string
	Port int
	Tags []string
	HW   NodeHW

	Identity string
}

func ParseNodeSet

func ParseNodeSet(hosts string, port int, identity string) ([]Node, error)

func SelectNode added in v0.10.0

func SelectNode(nodes []Node) Node

func SelectNodes added in v0.9.0

func SelectNodes(nodes []Node) []Node

func (Node) Addr

func (n Node) Addr() string

func (Node) HasTag added in v0.8.0

func (n Node) HasTag(tag string) bool

func (Node) HasTags added in v0.8.0

func (n Node) HasTags(tags []string) bool

func (Node) Label added in v0.9.0

func (n Node) Label() string

type NodeHW added in v0.10.0

type NodeHW struct {
	Cores  int
	Memory int // In megabyte
}

type Release

type Release struct {
	Time    string
	Hash    string
	Tarball Tarball
}

func NewRelease

func NewRelease(tarPath string) (*Release, error)

type Tarball

type Tarball struct {
	Path string
}

Jump to

Keyboard shortcuts

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