Documentation ¶
Index ¶
- Constants
- func JobRunnerIsValid(runner string) error
- type APIConfig
- type Client
- func (c *Client) Close() error
- func (c *Client) CreateJob(cfg JobConfig) (Job, error)
- func (c *Client) GetJob(jobID string) (Job, error)
- func (c *Client) GetJobLogs(jobID string) ([]byte, error)
- func (c *Client) Login(clientID string, authKey string) error
- func (c *Client) Register(clientID string, authKey string) error
- func (c *Client) StopJob(jobID string) error
- func (c *Client) Unregister(clientID string) error
- func (c *Client) UpdateJobRunner(runner string) error
- type ClientConfig
- type ClientOption
- type Config
- type DialContextFn
- type Job
- type JobAPIType
- type JobConfig
- type JobService
- func (s *JobService) CreateRecordingJobDocker(cfg JobConfig, onStopCb stopCb) (Job, error)
- func (s *JobService) RecordingJobLogsDocker(jobID string) ([]byte, error)
- func (s *JobService) RemoveRecordingJobDocker(jobID string) error
- func (s *JobService) StopRecordingJobDocker(jobID string) error
- func (s *JobService) UpdateJobRunnerDocker(runner string) error
- type JobType
- type JobsConfig
- type RecordingJobInputData
- type SecurityConfig
- type Service
- type StoreConfig
Constants ¶
View Source
const ( JobAPITypeDocker = "docker" JobAPITypeKubernetes = "kubernetes" )
Variables ¶
This section is empty.
Functions ¶
func JobRunnerIsValid ¶ added in v0.2.0
Types ¶
type APIConfig ¶
type APIConfig struct { HTTP api.Config `toml:"http"` Security SecurityConfig `toml:"security"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(cfg ClientConfig, opts ...ClientOption) (*Client, error)
func (*Client) Unregister ¶
func (*Client) UpdateJobRunner ¶ added in v0.1.3
type ClientConfig ¶
type ClientConfig struct { ClientID string AuthKey string URL string // contains filtered or unexported fields }
func (*ClientConfig) Parse ¶
func (c *ClientConfig) Parse() error
type ClientOption ¶
func WithDialFunc ¶
func WithDialFunc(dialFn DialContextFn) ClientOption
WithDialFunc lets the caller set an optional dialing function to setup the HTTP/WebSocket connections used by the client.
type Config ¶
type Config struct { API APIConfig Store StoreConfig Jobs JobsConfig Logger logger.Config }
func (*Config) SetDefaults ¶
func (c *Config) SetDefaults()
type DialContextFn ¶
type JobAPIType ¶
type JobAPIType string
type JobConfig ¶
type JobService ¶
type JobService struct {
// contains filtered or unexported fields
}
func NewJobService ¶
func NewJobService(cfg JobsConfig, log *mlog.Logger) (*JobService, error)
func (*JobService) CreateRecordingJobDocker ¶
func (s *JobService) CreateRecordingJobDocker(cfg JobConfig, onStopCb stopCb) (Job, error)
func (*JobService) RecordingJobLogsDocker ¶
func (s *JobService) RecordingJobLogsDocker(jobID string) ([]byte, error)
func (*JobService) RemoveRecordingJobDocker ¶ added in v0.1.2
func (s *JobService) RemoveRecordingJobDocker(jobID string) error
func (*JobService) StopRecordingJobDocker ¶
func (s *JobService) StopRecordingJobDocker(jobID string) error
func (*JobService) UpdateJobRunnerDocker ¶ added in v0.1.3
func (s *JobService) UpdateJobRunnerDocker(runner string) error
type JobsConfig ¶
type JobsConfig struct { APIType JobAPIType `toml:"api_type"` MaxConcurrentJobs int `toml:"max_concurrent_jobs"` }
func (JobsConfig) IsValid ¶
func (c JobsConfig) IsValid() error
type RecordingJobInputData ¶
type RecordingJobInputData struct { SiteURL string `json:"site_url"` CallID string `json:"call_id"` ThreadID string `json:"thread_id"` AuthToken string `json:"auth_token"` }
func (*RecordingJobInputData) FromMap ¶
func (c *RecordingJobInputData) FromMap(m map[string]any) *RecordingJobInputData
func (RecordingJobInputData) IsValid ¶
func (c RecordingJobInputData) IsValid() error
func (*RecordingJobInputData) ToEnv ¶
func (c *RecordingJobInputData) ToEnv() []string
func (*RecordingJobInputData) ToMap ¶
func (c *RecordingJobInputData) ToMap() map[string]any
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.