config

package
v0.0.0-...-adb0196 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadWorkerSpec

func LoadWorkerSpec(fn string) (*pb.Worker, error)

LoadWorkerSpec loads worker spec config.

Types

type ClusterCfg

type ClusterCfg struct {
	ID          string   `json:"cluster_id"`
	ZKEndpoints []string `json:"zk_endpoints"`
}

ClusterCfg is the cluster config

func LoadClusterCfg

func LoadClusterCfg(fn string) (*ClusterCfg, error)

LoadClusterCfg loads the cluster config.

func (*ClusterCfg) GetAssignPath

func (c *ClusterCfg) GetAssignPath() string

GetAssignPath gets znode path "/engine-resource-allocate-service/{cluster_id}/assign".

func (*ClusterCfg) GetClusterPath

func (c *ClusterCfg) GetClusterPath() string

GetClusterPath gets znode path "/engine-resource-allocate-service/{cluster_id}".

func (*ClusterCfg) GetElectionPath

func (c *ClusterCfg) GetElectionPath() string

GetElectionPath gets znode path "/engine-resource-allocate-service/{cluster_id}/election".

func (*ClusterCfg) GetLeaderPath

func (c *ClusterCfg) GetLeaderPath() string

GetLeaderPath gets znode path "/engine-resource-allocate-service/{cluster_id}/leader".

func (*ClusterCfg) GetNotifierPath

func (c *ClusterCfg) GetNotifierPath() string

GetNotifierPath gets znode path "/engine-resource-allocate-service/{cluster_id}/notifier".

func (*ClusterCfg) GetRootPath

func (c *ClusterCfg) GetRootPath() string

GetRootPath gets znode path "/engine-resource-allocate-service".

func (*ClusterCfg) GetTaskAssignPath

func (c *ClusterCfg) GetTaskAssignPath(id string, uuid string) string

GetTaskAssignPath gets znode path "/engine-resource-allocate-service/{cluster_id}/assign/{worker_id}/{task_uuid}".

func (*ClusterCfg) GetTaskPath

func (c *ClusterCfg) GetTaskPath(uuid string) string

GetTaskPath gets znode path "/engine-resource-allocate-service/{cluster_id}/tasks/{task_uuid}".

func (*ClusterCfg) GetTaskStatusPath

func (c *ClusterCfg) GetTaskStatusPath(uuid string) string

GetTaskStatusPath gets znode path "/engine-resource-allocate-service/{cluster_id}/tasks/{task_uuid}/status".

func (*ClusterCfg) GetTasksPath

func (c *ClusterCfg) GetTasksPath() string

GetTasksPath gets znode path "/engine-resource-allocate-service/{cluster_id}/tasks".

func (*ClusterCfg) GetWorkerAssignPath

func (c *ClusterCfg) GetWorkerAssignPath(id string) string

GetWorkerAssignPath gets znode path "/engine-resource-allocate-service/{cluster_id}/assign/{worker_id}".

func (*ClusterCfg) GetWorkerPath

func (c *ClusterCfg) GetWorkerPath(id string) string

GetWorkerPath gets znode path "/engine-resource-allocate-service/{cluster_id}/workers/{worker_id}".

func (*ClusterCfg) GetWorkersPath

func (c *ClusterCfg) GetWorkersPath() string

GetWorkersPath gets znode path "/engine-resource-allocate-service/{cluster_id}/workers".

func (*ClusterCfg) Validate

func (c *ClusterCfg) Validate() error

Validate validates the cluster config.

Jump to

Keyboard shortcuts

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