Documentation ¶
Index ¶
- Constants
- type Deployments
- type Job
- type MockDeployments
- type MockJob
- func (m *MockJob) Allocations(jobID string, allAllocs bool, q *api.QueryOptions) ([]*api.AllocationListStub, *api.QueryMeta, error)
- func (m *MockJob) Deregister(jobID string, purge bool, q *api.WriteOptions) (string, *api.WriteMeta, error)
- func (m *MockJob) Info(jobID string, q *api.QueryOptions) (*api.Job, *api.QueryMeta, error)
- func (m *MockJob) List(q *api.QueryOptions) ([]*api.JobListStub, *api.QueryMeta, error)
- func (m *MockJob) Register(job *api.Job, options *api.WriteOptions) (*api.JobRegisterResponse, *api.WriteMeta, error)
Constants ¶
View Source
const JobPrefix = "OpenFaaS-"
JobPrefix contains a string that prefixes all OpenFaaS jobs
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployments ¶
type Deployments interface { // List is used to dump all of the evaluations. List(q *api.QueryOptions) ([]*api.Deployment, *api.QueryMeta, error) }
Deployments is an interface for the Nomad API
type Job ¶
type Job interface { // Register creates a new Nomad job Register(*api.Job, *api.WriteOptions) (*api.JobRegisterResponse, *api.WriteMeta, error) Info(jobID string, q *api.QueryOptions) (*api.Job, *api.QueryMeta, error) List(q *api.QueryOptions) ([]*api.JobListStub, *api.QueryMeta, error) Deregister(jobID string, purge bool, q *api.WriteOptions) (string, *api.WriteMeta, error) Allocations(jobID string, allAllocs bool, q *api.QueryOptions) ([]*api.AllocationListStub, *api.QueryMeta, error) }
Job defines the interface for creating a new new job
type MockDeployments ¶
func (*MockDeployments) List ¶
func (m *MockDeployments) List(q *api.QueryOptions) ([]*api.Deployment, *api.QueryMeta, error)
type MockJob ¶
MockJob is a mock implementation of the Job interface
func (*MockJob) Allocations ¶ added in v0.2.25
func (m *MockJob) Allocations(jobID string, allAllocs bool, q *api.QueryOptions) ([]*api.AllocationListStub, *api.QueryMeta, error)
func (*MockJob) Deregister ¶
func (m *MockJob) Deregister(jobID string, purge bool, q *api.WriteOptions) ( string, *api.WriteMeta, error)
Deregister is a mock implementation of the interface method
func (*MockJob) List ¶
func (m *MockJob) List(q *api.QueryOptions) ([]*api.JobListStub, *api.QueryMeta, error)
List returns mock info from the job API
Click to show internal directories.
Click to hide internal directories.