services

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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

type MockJobs struct {
	mock.Mock
}

func (*MockJobs) Allocations

func (m *MockJobs) Allocations(jobID string, allAllocs bool, q *api.QueryOptions) ([]*api.AllocationListStub, *api.QueryMeta, error)

func (*MockJobs) Deregister

func (m *MockJobs) Deregister(jobID string, purge bool, q *api.WriteOptions) (string, *api.WriteMeta, error)

func (*MockJobs) Info

func (m *MockJobs) Info(jobID string, q *api.QueryOptions) (*api.Job, *api.QueryMeta, error)

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)

func (*MockJobs) Scale added in v0.4.0

func (m *MockJobs) Scale(jobID, group string, count *int, message string, error bool, meta map[string]interface{}, q *api.WriteOptions) (*api.JobRegisterResponse, *api.WriteMeta, error)

type MockResolver

type MockResolver struct {
	mock.Mock
}

func (*MockResolver) RemoveCacheItem

func (mr *MockResolver) RemoveCacheItem(functionName string)

func (*MockResolver) Resolve

func (mr *MockResolver) Resolve(functionName string) (url.URL, error)

type MockSecrets

type MockSecrets struct {
	mock.Mock
}

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) List

func (ms *MockSecrets) List() ([]ftypes.Secret, error)

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) List

func (vs *VaultSecrets) List() ([]ftypes.Secret, error)

func (*VaultSecrets) Set

func (vs *VaultSecrets) Set(key, value string) error

Jump to

Keyboard shortcuts

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