kungfurun

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InferSelfIPv4

func InferSelfIPv4(ipv4 string, nic string) (uint32, error)

func Init

func Init(f *FlagSet)

func ResolveHostList

func ResolveHostList(config string, nic string) (plan.HostList, error)

func ResolvePeerList

func ResolvePeerList(localhostIPv4 uint32, port uint16, config string) (plan.PeerList, error)

func SimpleRun

func SimpleRun(ctx context.Context, selfIPv4 uint32, pl plan.PeerList, j job.Job, verboseLog bool)

func WatchRun

func WatchRun(ctx context.Context, parent plan.PeerID, parents plan.PeerList, ch chan Stage, j job.Job)

Types

type FlagSet

type FlagSet struct {
	ClusterSize int
	HostList    string
	PeerList    string

	User string

	PortRange plan.PortRange

	Self       string
	Timeout    time.Duration
	VerboseLog bool
	NIC        string

	Strategy kb.Strategy

	Port       int
	Watch      bool
	Checkpoint string

	Logfile string
	LogDir  string
	Quiet   bool

	Prog string
	Args []string
}

func (*FlagSet) Parse

func (f *FlagSet) Parse() error

func (*FlagSet) Register

func (f *FlagSet) Register(flag *flag.FlagSet)

type Handler

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

func NewHandler

func NewHandler(self plan.PeerID, ch chan Stage, cancel context.CancelFunc) *Handler

func (*Handler) Handle

func (h *Handler) Handle(conn net.Conn, remote plan.NetAddr, t rch.ConnType) error

func (*Handler) Self

func (h *Handler) Self() plan.PeerID

type HostSpec

type HostSpec struct {
	Hostname   string
	Slots      int
	PublicAddr string
}

func ParseHostList

func ParseHostList(config string) ([]HostSpec, error)

type PeerSpec

type PeerSpec struct {
	Host string
	Port uint16
	Slot int
}

func ParsePeerSpec

func ParsePeerSpec(config string) (*PeerSpec, error)

func (PeerSpec) String

func (p PeerSpec) String() string

type PeerSpecList

type PeerSpecList []PeerSpec

func ParsePeerSpecList

func ParsePeerSpecList(config string) (PeerSpecList, error)

func (PeerSpecList) Eq

func (l PeerSpecList) Eq(r PeerSpecList) bool

func (PeerSpecList) String

func (l PeerSpecList) String() string

type Stage

type Stage struct {
	Checkpoint string
	Cluster    plan.PeerList
}

func (*Stage) Decode

func (s *Stage) Decode(bs []byte) error

func (Stage) Encode

func (s Stage) Encode() []byte

func (Stage) Eq

func (s Stage) Eq(t Stage) bool

Jump to

Keyboard shortcuts

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