Documentation
¶
Overview ¶
Package daemon provides the implementation of the Steady host daemon. The Daemon handles receiving application http requests, backing up sqlite databases, and managing the lifecycle of an application while it is on a host.
Index ¶
- type Client
- func (c Client) CreateApplication(ctx context.Context, req *daemonrpc.CreateApplicationRequest) (*daemonrpc.Application, error)
- func (c Client) DeleteApplication(ctx context.Context, req *daemonrpc.DeleteApplicationRequest) (*daemonrpc.Application, error)
- func (c Client) GetApplication(ctx context.Context, req *daemonrpc.GetApplicationRequest) (*daemonrpc.Application, error)
- func (c Client) UpdateApplication(ctx context.Context, req *daemonrpc.UpdateApplicationRequest) (*daemonrpc.UpdateApplicationResponse, error)
- type Daemon
- type DaemonOption
- type S3Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an http client that is used to communicate with host daemons.
func (Client) CreateApplication ¶
func (c Client) CreateApplication(ctx context.Context, req *daemonrpc.CreateApplicationRequest) ( *daemonrpc.Application, error)
func (Client) DeleteApplication ¶
func (c Client) DeleteApplication(ctx context.Context, req *daemonrpc.DeleteApplicationRequest) ( *daemonrpc.Application, error)
func (Client) GetApplication ¶
func (c Client) GetApplication(ctx context.Context, req *daemonrpc.GetApplicationRequest) ( *daemonrpc.Application, error)
func (Client) UpdateApplication ¶
func (c Client) UpdateApplication(ctx context.Context, req *daemonrpc.UpdateApplicationRequest) ( *daemonrpc.UpdateApplicationResponse, error)
type Daemon ¶
type Daemon struct {
// contains filtered or unexported fields
}
Daemon is the steady daemon. It runs an http server, handles requests to create and delete applications, and handles database backups and migrations.
func (*Daemon) ServerAddr ¶
ServerAddr returns the address of the running server. Will panic if the server hasn't been started yet.
func (*Daemon) StopAllApplications ¶
func (d *Daemon) StopAllApplications()
StopAllApplications will loop through all applications and shut them down. Useful for tests where we would otherwise wait for applications to shut down normally.
type DaemonOption ¶
type DaemonOption func(*Daemon)
func DaemonOptionWithS3 ¶
func DaemonOptionWithS3(cfg S3Config) DaemonOption