Documentation ¶
Index ¶
- type Config
- type ConfigData
- type CreateArgs
- type GetArgs
- type GetResult
- type ListResult
- type Mock
- func (m *Mock) Add(service Service)
- func (m *Mock) ClearData()
- func (m *Mock) Create(req *acomm.Request) (interface{}, *url.URL, error)
- func (m *Mock) Get(req *acomm.Request) (interface{}, *url.URL, error)
- func (m *Mock) List(req *acomm.Request) (interface{}, *url.URL, error)
- func (m *Mock) RegisterTasks(server *provider.Server)
- func (m *Mock) Remove(req *acomm.Request) (interface{}, *url.URL, error)
- func (m *Mock) Restart(req *acomm.Request) (interface{}, *url.URL, error)
- type MockData
- type Provider
- func (p *Provider) Create(req *acomm.Request) (interface{}, *url.URL, error)
- func (p *Provider) Get(req *acomm.Request) (interface{}, *url.URL, error)
- func (p *Provider) List(req *acomm.Request) (interface{}, *url.URL, error)
- func (p *Provider) RegisterTasks(server *provider.Server)
- func (p *Provider) Remove(req *acomm.Request) (interface{}, *url.URL, error)
- func (p *Provider) Restart(req *acomm.Request) (interface{}, *url.URL, error)
- type RemoveArgs
- type RestartArgs
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config holds all configuration for the provider.
func (*Config) DatasetCloneDir ¶
DatasetCloneDir returns the zfs path in which to clone datasets.
func (*Config) LoadConfig ¶
LoadConfig loads and validates the config data.
func (*Config) RollbackCloneCmd ¶
RollbackCloneCmd returns the full path of the clone/rollback script datasets for services.
type ConfigData ¶
type ConfigData struct { provider.ConfigData RollbackCloneCmd string `json:"rollback_clone_cmd"` DatasetCloneDir string `json:"dataset_clone_dir"` }
ConfigData defines the structure of the config data (e.g. in the config file)
type CreateArgs ¶
type CreateArgs struct { ID string `json:"id"` BundleID uint64 `json:"bundleID"` Dataset string `json:"dataset"` Description string `json:"description"` Cmd []string `json:"cmd"` Env map[string]string `json:"env"` Overwrite bool `json:"overwrite"` }
CreateArgs contains args for creating or replacing a Service.
type GetResult ¶
type GetResult struct {
Service Service `json:"service"`
}
GetResult is the result of a Get.
type ListResult ¶
type ListResult struct {
Services []Service
}
ListResult is the result of the List handler.
type Mock ¶
type Mock struct {
Data MockData
}
Mock is a mock provider of service management functionality.
func (*Mock) RegisterTasks ¶
RegisterTasks registers all of the mock provider task handlers with the server.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is a provider of service management functionality.
func (*Provider) RegisterTasks ¶
RegisterTasks registers all of the provider task handlers with the server.
type RemoveArgs ¶
RemoveArgs are arguments for the Remove task.
type RestartArgs ¶
RestartArgs are arguments for Restart.
type Service ¶
type Service struct { ID string `json:"id"` BundleID uint64 `json:"bundleID"` Description string `json:"description"` Uptime time.Duration `json:"uptime"` ActiveState string `json:"activeState"` Cmd []string `json:"cmd"` UID uint64 `json:"uid"` GID uint64 `json:"gid"` Env map[string]string `json:"env"` }
Service is information about a service.