Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIConfig ¶
type APIConfig struct { HTTP api.Config `toml:"http"` Security SecurityConfig `toml:"security"` }
type Config ¶
type Config struct { API APIConfig Store StoreConfig Jobs JobsConfig Logger logger.Config }
func (*Config) ParseFromEnv ¶ added in v0.4.1
func (*Config) SetDefaults ¶
func (c *Config) SetDefaults()
type JobAPIType ¶
type JobAPIType string
const ( JobAPITypeDocker JobAPIType = "docker" JobAPITypeKubernetes = "kubernetes" )
type JobService ¶
type JobService interface { Init(cfg job.ServiceConfig) error CreateJob(cfg job.Config, onStopCb job.StopCb) (job.Job, error) DeleteJob(jobID string) error GetJobLogs(jobID string, stdout, stderr io.Writer) error Shutdown() error }
func NewJobService ¶
func NewJobService(cfg JobsConfig, log mlog.LoggerIFace) (JobService, error)
type JobsConfig ¶
type JobsConfig struct { APIType JobAPIType `toml:"api_type"` MaxConcurrentJobs int `toml:"max_concurrent_jobs"` FailedJobsRetentionTime RetentionTime `toml:"failed_jobs_retention_time" ignored:"true"` ImageRegistry string `toml:"image_registry"` Kubernetes kubernetes.JobServiceConfig `toml:"kubernetes"` Docker docker.JobServiceConfig `toml:"docker"` }
func (JobsConfig) IsValid ¶
func (c JobsConfig) IsValid() error
type RetentionTime ¶ added in v0.6.0
Alias is needed to implement custom unmarshaler.
func (*RetentionTime) UnmarshalText ¶ added in v0.6.0
func (rt *RetentionTime) UnmarshalText(data []byte) error
type SecurityConfig ¶
type SecurityConfig struct { // Whether or not to enable admin API access. EnableAdmin bool `toml:"enable_admin"` // The secret key used to authenticate admin requests. AdminSecretKey string `toml:"admin_secret_key"` // Whether or not to allow clients to self-register. AllowSelfRegistration bool `toml:"allow_self_registration"` SessionCache auth.SessionCacheConfig `toml:"session_cache"` }
func (SecurityConfig) IsValid ¶
func (c SecurityConfig) IsValid() error
type StoreConfig ¶
type StoreConfig struct {
DataSource string `toml:"data_source"`
}
func (StoreConfig) IsValid ¶
func (c StoreConfig) IsValid() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.