Documentation ¶
Index ¶
- Constants
- type JobFactory
- type Jobs
- type MockJobs
- func (m *MockJobs) Allocations(jobID string, allAllocs bool, q *api.QueryOptions) ([]*api.AllocationListStub, *api.QueryMeta, error)
- func (m *MockJobs) Deregister(jobID string, purge bool, q *api.WriteOptions) (string, *api.WriteMeta, error)
- func (m *MockJobs) Info(jobID string, q *api.QueryOptions) (*api.Job, *api.QueryMeta, error)
- func (m *MockJobs) LatestDeployment(jobID string, q *api.QueryOptions) (*api.Deployment, *api.QueryMeta, error)
- func (m *MockJobs) List(q *api.QueryOptions) ([]*api.JobListStub, *api.QueryMeta, error)
- func (m *MockJobs) RegisterOpts(job *api.Job, opts *api.RegisterOptions, w *api.WriteOptions) (*api.JobRegisterResponse, *api.WriteMeta, error)
- func (m *MockJobs) Scale(jobID, group string, count *int, message string, error bool, ...) (*api.JobRegisterResponse, *api.WriteMeta, error)
- type MockResolver
- type MockSecrets
- type Secrets
- type VaultSecrets
Constants ¶
View Source
const (
EnvProcessName = "fprocess"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobFactory ¶ added in v0.5.0
type JobFactory interface {
CreateJob(namespace string, fd ftypes.FunctionDeployment) *api.Job
}
func NewJobFactory ¶ added in v0.5.0
func NewJobFactory(config *types.ProviderConfig) JobFactory
type Jobs ¶
type Jobs interface { List(q *api.QueryOptions) ([]*api.JobListStub, *api.QueryMeta, error) Info(jobID string, q *api.QueryOptions) (*api.Job, *api.QueryMeta, error) LatestDeployment(jobID string, q *api.QueryOptions) (*api.Deployment, *api.QueryMeta, error) RegisterOpts(job *api.Job, opts *api.RegisterOptions, q *api.WriteOptions) (*api.JobRegisterResponse, *api.WriteMeta, error) Deregister(jobID string, purge bool, q *api.WriteOptions) (string, *api.WriteMeta, error) Scale(jobID, group string, count *int, message string, error bool, meta map[string]interface{}, q *api.WriteOptions) (*api.JobRegisterResponse, *api.WriteMeta, error) Allocations(jobID string, allAllocs bool, q *api.QueryOptions) ([]*api.AllocationListStub, *api.QueryMeta, error) }
func NewNomadJobs ¶
func NewNomadJobs(config types.NomadConfig) (Jobs, error)
type MockJobs ¶
func (*MockJobs) Allocations ¶
func (m *MockJobs) Allocations(jobID string, allAllocs bool, q *api.QueryOptions) ([]*api.AllocationListStub, *api.QueryMeta, error)
func (*MockJobs) Deregister ¶
func (*MockJobs) LatestDeployment ¶ added in v0.4.0
func (m *MockJobs) LatestDeployment(jobID string, q *api.QueryOptions) (*api.Deployment, *api.QueryMeta, error)
func (*MockJobs) List ¶
func (m *MockJobs) List(q *api.QueryOptions) ([]*api.JobListStub, *api.QueryMeta, error)
func (*MockJobs) RegisterOpts ¶ added in v0.4.0
func (m *MockJobs) RegisterOpts(job *api.Job, opts *api.RegisterOptions, w *api.WriteOptions) (*api.JobRegisterResponse, *api.WriteMeta, error)
type MockResolver ¶
func (*MockResolver) RemoveCacheItem ¶
func (mr *MockResolver) RemoveCacheItem(functionName string)
type MockSecrets ¶
func (*MockSecrets) Delete ¶
func (ms *MockSecrets) Delete(key string) error
func (*MockSecrets) Exists ¶ added in v0.4.0
func (ms *MockSecrets) Exists(key string) bool
func (*MockSecrets) Set ¶
func (ms *MockSecrets) Set(key, value string) error
type Secrets ¶
type Secrets interface { List() ([]ftypes.Secret, error) Set(key, value string) error Exists(key string) bool Delete(key string) error }
func NewVaultSecrets ¶
func NewVaultSecrets(config types.VaultConfig) (Secrets, error)
type VaultSecrets ¶
type VaultSecrets struct {
// contains filtered or unexported fields
}
func (*VaultSecrets) Delete ¶
func (vs *VaultSecrets) Delete(key string) error
func (*VaultSecrets) Exists ¶ added in v0.4.0
func (vs *VaultSecrets) Exists(key string) bool
func (*VaultSecrets) Set ¶
func (vs *VaultSecrets) Set(key, value string) error
Click to show internal directories.
Click to hide internal directories.