Documentation ¶
Index ¶
- Constants
- func GetCliCommand() *cli.Command
- func MonitorThread(node *Node, ctx context.Context, logger *slog.Logger, done func())
- func NServerThread(node *Node, ctx context.Context, logger *slog.Logger, done func())
- func NodeStateThread(n *Node, ctx context.Context, logger *slog.Logger, done func())
- type Action
- type AdHocAction
- type Node
- type NodeCommState
- type NodeConfig
- type NodeState
Constants ¶
View Source
const ActionGroupDefaultDefault = 0
Default number of actions that do not specify an action group
View Source
const ActionGroupTotalDefault = 100
By default number of concurrent actions
View Source
const NodePollPeriod time.Duration = orchestrator.DisconnectStaleNodePeriod / 2
View Source
const NodeQuickPollPeriod time.Duration = NodePollPeriod / time.Duration(QuickPollThreshold)
View Source
const QuickPollThreshold int = 25
View Source
const StreamTeardownDelay = 250 * time.Millisecond
Variables ¶
This section is empty.
Functions ¶
func GetCliCommand ¶
func GetCliCommand() *cli.Command
func MonitorThread ¶
func NServerThread ¶
Types ¶
type Action ¶
type AdHocAction ¶
type AdHocAction struct {
ActionDef Action `yaml:"action" json:"action"`
}
type Node ¶
type Node struct { Name string ServerPort int DataDir string Data map[string]map[string]interface{} ActionsPath string Actions map[string]*Action OrchAddr string ArbitraryActions bool LogFile string MaxNumActions int CertPath string Resources *resources.ResourceManager // contains filtered or unexported fields }
func (*Node) ReloadActions ¶
type NodeCommState ¶
type NodeCommState string
const ( Polling NodeCommState = "polling" QuickPolling NodeCommState = "quick-polling" Registered NodeCommState = "registered" Disconnecting NodeCommState = "disconnecting" Disconnected NodeCommState = "disconnected" Idle NodeCommState = "idle" )
type NodeConfig ¶
type NodeConfig struct { Name string `yaml:"name"` Port int `yaml:"port"` Host string `yaml:"host"` Orchestrator string `yaml:"orchestrator"` Data string `yaml:"data"` Log string `yaml:"log"` LogLevel string `yaml:"log-level"` CertPath string `yaml:"cert-path"` ArbitraryActions bool `yaml:"arbitrary-actions"` Actions map[string]*Action `yaml:"actions"` ResourceGroups map[string]int64 `yaml:"resource-groups"` }
func NewNodeConfig ¶
func NewNodeConfig() *NodeConfig
func (*NodeConfig) ReadConfig ¶
func (c *NodeConfig) ReadConfig(path string) error
type NodeState ¶
type NodeState struct {
// contains filtered or unexported fields
}
func (*NodeState) ChangeState ¶
func (ns *NodeState) ChangeState(state NodeCommState)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.