runner

package
Version: v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: Apache-2.0 Imports: 28 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, args []string)

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, cluster plan.Cluster, j job.Job, verboseLog bool)

func WatchRun

func WatchRun(ctx context.Context, self plan.PeerID, runners plan.PeerList, ch chan Stage, j job.Job, keep bool, debugPort int)

Types

type FlagSet

type FlagSet struct {
	ConfigServer string
	ClusterSize  int

	HostList plan.HostList

	User string

	PortRange plan.PortRange

	Self        string
	Timeout     time.Duration
	VerboseLog  bool
	NIC         string
	AllowNVLink bool

	Strategy base.Strategy

	Port        int
	DebugPort   int
	Watch       bool
	Keep        bool
	InitVersion int

	Logfile string
	LogDir  string
	Quiet   bool

	JobStartTime int
	Prog         string
	Args         []string

	// debug and testing flags
	BuiltinConfigPort int
	DelayStart        time.Duration
	// contains filtered or unexported fields
}

func (*FlagSet) Parse

func (f *FlagSet) Parse(args []string) 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 connection.Connection) (int, error)

func (*Handler) Self

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

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request)

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 {
	Version int
	Cluster plan.Cluster
}

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