Documentation ¶
Index ¶
- type AllocationClient
- type AllocationFSClient
- type JobClient
- type NamespaceClient
- type NodePoolsClient
- type NodesClient
- type Nomad
- func (n *Nomad) AllocationEvents(allocation *api.AllocationListStub) ([]models.Events, string)
- func (n *Nomad) AllocationStats(params *models.NomadParams, allocation *api.Allocation) (models.AllocationStats, error)
- func (n *Nomad) AllocationTask(params *models.NomadParams, allocationId string) ([]models.Tasks, error)
- func (n *Nomad) Allocations(allocName string, params *models.NomadParams) ([]models.Allocations, error)
- func (n *Nomad) Deregister(jobId string, purge bool, params *models.NomadParams) error
- func (n *Nomad) DryRun(jobHcl string) (*api.Job, error)
- func (n *Nomad) GetAllocCounts(nodeId string, params *models.NomadParams) int
- func (n *Nomad) GetJob(jobId string) (*api.Job, error)
- func (n *Nomad) Jobs(params *models.NomadParams) ([]models.Jobs, error)
- func (n *Nomad) Logs(allocID, taskName, logType, origin string, follow bool, offset int64, ...) (<-chan *api.StreamFrame, <-chan error)
- func (n *Nomad) Namespaces() ([]models.Namespaces, error)
- func (n *Nomad) NodeList(params *models.NomadParams) ([]models.Nodes, error)
- func (n *Nomad) NodePoolList(params *models.NomadParams) ([]models.NodePools, error)
- func (n *Nomad) Regions() ([]models.Regions, error)
- func (n *Nomad) Register(job *api.Job, params *models.NomadParams) error
- func (n *Nomad) Restart(allocId, taskName string, params *models.NomadParams) error
- func (n *Nomad) Revert(jobId string, version uint64, params *models.NomadParams) error
- func (n *Nomad) Submission(jobId, version string, params *models.NomadParams) (*api.JobSubmission, error)
- func (n *Nomad) TaskGroups(jobId, region, namespace string) ([]models.TaskGroups, error)
- func (n *Nomad) Versions(jobId string, params *models.NomadParams) ([]models.JobVersion, []models.JobVersionDiff, error)
- type RegionClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocationClient ¶
type AllocationClient interface { List(*api.QueryOptions) ([]*api.AllocationListStub, *api.QueryMeta, error) Info(string, *api.QueryOptions) (*api.Allocation, *api.QueryMeta, error) Stats(*api.Allocation, *api.QueryOptions) (*api.AllocResourceUsage, error) Restart(*api.Allocation, string, *api.QueryOptions) error }
type AllocationFSClient ¶
type AllocationFSClient interface { Logs( alloc *api.Allocation, follow bool, task string, logType string, origin string, offset int64, cancel <-chan struct{}, query *api.QueryOptions) (<-chan *api.StreamFrame, <-chan error) }
type JobClient ¶
type JobClient interface { List(*api.QueryOptions) ([]*api.JobListStub, *api.QueryMeta, error) Info(string, *api.QueryOptions) (*api.Job, *api.QueryMeta, error) Summary(string, *api.QueryOptions) (*api.JobSummary, *api.QueryMeta, error) Allocations(string, bool, *api.QueryOptions) ([]*api.AllocationListStub, *api.QueryMeta, error) Versions(string, bool, *api.QueryOptions) ([]*api.Job, []*api.JobDiff, *api.QueryMeta, error) Submission(string, int, *api.QueryOptions) (*api.JobSubmission, *api.QueryMeta, error) Revert(string, uint64, *uint64, *api.WriteOptions, string, string) (*api.JobRegisterResponse, *api.WriteMeta, error) Deregister(string, bool, *api.WriteOptions) (string, *api.WriteMeta, error) Register(*api.Job, *api.WriteOptions) (*api.JobRegisterResponse, *api.WriteMeta, error) ParseHCL(string, bool) (*api.Job, error) }
type NamespaceClient ¶
type NodePoolsClient ¶
type NodePoolsClient interface { List(*api.QueryOptions) ([]*api.NodePool, *api.QueryMeta, error) Info(string, *api.QueryOptions) (*api.NodePool, *api.QueryMeta, error) ListJobs(string, *api.QueryOptions) ([]*api.JobListStub, *api.QueryMeta, error) ListNodes(string, *api.QueryOptions) ([]*api.NodeListStub, *api.QueryMeta, error) }
type NodesClient ¶
type NodesClient interface { List(*api.QueryOptions) ([]*api.NodeListStub, *api.QueryMeta, error) Allocations(string, *api.QueryOptions) ([]*api.Allocation, *api.QueryMeta, error) }
type Nomad ¶
type Nomad struct { Client *api.Client RegionClient RegionClient NamespaceClient NamespaceClient JobClient JobClient AllocationClient AllocationClient AllocationFSClient AllocationFSClient NodePoolsClient NodePoolsClient NodesClient NodesClient Namespace string Logger *utils.Logger }
func (*Nomad) AllocationEvents ¶
func (*Nomad) AllocationStats ¶
func (n *Nomad) AllocationStats(params *models.NomadParams, allocation *api.Allocation) (models.AllocationStats, error)
func (*Nomad) AllocationTask ¶
func (*Nomad) Allocations ¶
func (n *Nomad) Allocations(allocName string, params *models.NomadParams) ([]models.Allocations, error)
func (*Nomad) Deregister ¶
Deregister job
func (*Nomad) GetAllocCounts ¶
func (n *Nomad) GetAllocCounts(nodeId string, params *models.NomadParams) int
func (*Nomad) Namespaces ¶
func (n *Nomad) Namespaces() ([]models.Namespaces, error)
func (*Nomad) NodePoolList ¶
func (*Nomad) Restart ¶
func (n *Nomad) Restart(allocId, taskName string, params *models.NomadParams) error
func (*Nomad) Submission ¶
func (n *Nomad) Submission(jobId, version string, params *models.NomadParams) (*api.JobSubmission, error)
Get Definitionn of Job(.hcl source file)
func (*Nomad) TaskGroups ¶
func (n *Nomad) TaskGroups(jobId, region, namespace string) ([]models.TaskGroups, error)
Get TaskGroup list by jobId
func (*Nomad) Versions ¶
func (n *Nomad) Versions(jobId string, params *models.NomadParams) ([]models.JobVersion, []models.JobVersionDiff, error)
Get versions List by jobId
type RegionClient ¶
Click to show internal directories.
Click to hide internal directories.