Documentation
¶
Index ¶
Constants ¶
const ( MethodDeploy = "Deploy" MethodRestart = "Restart" MethodTerminate = "Terminate" )
Commands supported by the scheduler.
const ( // MetadataKeyError is the name of the metadata key that stores the error message. MetadataKeyError = "net.oasis.error" // MetadataKeySchedulerRAK is the name of the metadata key that stores the scheduler RAK. MetadataKeySchedulerRAK = "net.oasis.scheduler.rak" // MetadataKeyTLSPk is the name of the metadata key that stores the TLS public key. MetadataKeyTLSPk = "net.oasis.tls.pk" // MetadataKeySchedulerAPI is the name of the metadata key that stores the API endpoint address. MetadataKeySchedulerAPI = "net.oasis.scheduler.api" )
const StdAuthContextBase = "rofl-scheduler/auth: v1"
StdAuthContextBase is the base authentication context.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶ added in v0.14.0
func NewHTTPClient(dsc *rofl.Registration) (*http.Client, error)
NewHTTPClient creates an HTTP client to communicate with the given scheduler.
Types ¶
type AuthLoginRequest ¶ added in v0.14.0
AuthLoginRequest is the request to login.
type AuthLoginResponse ¶ added in v0.14.0
AuthLoginResponse is the response from the login request.
type Client ¶ added in v0.14.0
type Client struct {
// contains filtered or unexported fields
}
Client is a ROFL scheduler API endpoint client.
func NewClient ¶ added in v0.14.0
func NewClient(dsc *rofl.Registration) (*Client, error)
NewClient creates a new ROFL scheduler API endpoint client.
type Command ¶
type Command struct {
// Method is the method name.
Method string `json:"method"`
// Args are the method arguments.
Args cbor.RawMessage `json:"args"`
}
Command is a command to be executed on a specific instance by the scheduler.
type DeployRequest ¶
type DeployRequest struct {
// Deployment is the deployment to deploy.
Deployment roflmarket.Deployment `json:"deployment"`
// WipeStorage is a flag indicating whether persistent storage should be wiped.
WipeStorage bool `json:"wipe_storage"`
}
DeployRequest is a deployment request.
type LogsGetRequest ¶ added in v0.14.0
type LogsGetRequest struct {
// InstanceID is the instance identifier.
InstanceID string `json:"instance_id"`
// ComponentID is the optional component identifier.
ComponentID string `json:"component_id,omitempty"`
// Since is an optional UNIX timestamp to filter log entries by. Only entries with higher
// timestamps will be returned.
Since uint64 `json:"since,omitempty"`
}
LogsGetRequest is a request to get logs.
type LogsGetResponse ¶ added in v0.14.0
type LogsGetResponse struct {
// Logs are the resulting log lines.
Logs []string `json:"logs"`
}
LogsGetResponse is the response from the LogsGet request.
type RestartRequest ¶
type RestartRequest struct {
// WipeStorage is a flag indicating whether persistent storage should be wiped.
WipeStorage bool `json:"wipe_storage"`
}
RestartRequest is an instance restart request.
type StdAuthBody ¶ added in v0.14.0
type StdAuthBody struct {
Version uint16 `json:"v"`
Domain string `json:"domain"`
Provider types.Address `json:"provider"`
Signer types.PublicKey `json:"signer"`
Nonce string `json:"nonce"`
NotBefore uint64 `json:"not_before"`
NotAfter uint64 `json:"not_after"`
}
StdAuthBody is the standard authentication body.
type StdAuthLoginRequest ¶ added in v0.14.0
StdAuthLoginRequest is the body for the standard authentication method.
type TerminateRequest ¶
type TerminateRequest struct {
// WipeStorage is a flag indicating whether persistent storage should be wiped.
WipeStorage bool `json:"wipe_storage"`
}
TerminateRequest is an instance termination request.