Documentation
¶
Index ¶
- Constants
- func DeleteVolumeBackup(ctx context.Context, req BackupRequest) error
- func ExecuteServiceCommand(ctx context.Context, req ExecStreamRequest, stdin io.Reader, writer io.Writer) (int, error)
- func ExportImage(ctx context.Context, image string, w io.Writer) error
- func ReadMeshStatus(ctx context.Context, interfaceName string) (*mesh.Status, error)
- func RefreshActualStateDocuments(ctx context.Context, dataDir string, node string) (int, error)
- func ReleaseProjectPortAllocations(ctx context.Context, dataDir string, project string, environment string) error
- func ReleaseServicePortAllocations(ctx context.Context, dataDir string, project string, environment string, ...) error
- func RenderPrometheusMetrics(ctx context.Context, req PrometheusMetricsRequest) (string, error)
- func RestoreVolumeBackup(ctx context.Context, req BackupRequest) error
- func RunOneOffCommand(ctx context.Context, req RunOneOffRequest, stdin io.Reader, writer io.Writer) (int, error)
- func StreamNodeLogs(ctx context.Context, req NodeLogsRequest, writer io.Writer) error
- func StreamProxyAccessLogs(ctx context.Context, tail int, follow bool, writer io.Writer) error
- func StreamServiceLogs(ctx context.Context, req LogsRequest, writer io.Writer) error
- type AcmeDNSCredentialsRequest
- type AcmeDNSCredentialsResponse
- type AcmeDNSRegisterRequest
- type AcmeDNSRegisterResponse
- type AcmeDNSRegistration
- type ActualRefreshTarget
- type ActualService
- type ActualStateResponse
- type BackupCleanupResponse
- type BackupInfo
- type BackupListResponse
- type BackupRequest
- type CleanupRequest
- type CleanupResponse
- type ConfigFileMount
- type ContainerSpec
- type ContainerStat
- type DisableProxyResponse
- type DiscoveryEndpoint
- type DiscoveryRequest
- type DiscoveryResponse
- type DiscoveryService
- type DockerNodeInfo
- type EnvBundleRequest
- type EnvBundleResponse
- type ExecStreamRequest
- type ExecTargetRequest
- type ExecTargetResponse
- type HealthSpec
- type ImageBuildOptions
- type ImageBuildResponse
- type ImageExistsResponse
- type ImageImportResponse
- type ImageListRequest
- type ImageListResponse
- type ImagePruneRequest
- type ImagePruneResponse
- type ImageRemoveRequest
- type ImageRemoveResponse
- type ImageSummary
- type InspectContainer
- type InspectMount
- type InspectNetwork
- type InspectPort
- type InspectRequest
- type InspectResponse
- type InspectService
- type LeaseInfo
- type LeaseRequest
- type LeaseResponse
- type LogsRequest
- type MeshApplyRequest
- type MeshApplyResponse
- type MeshKeyResponse
- type MeshRTTRequest
- type MeshRTTResponse
- type MetadataRequest
- type MetadataResponse
- type MetricsResponse
- type NodeInfoResponse
- type NodeLogsRequest
- type PortAllocationRequest
- type PortAllocationResponse
- type PrometheusMetricsRequest
- type ProxyFileRequest
- type ProxyFileResponse
- type ProxyTargetRequest
- type ProxyTargetResponse
- type ReconcileAcmeDNSRequest
- type ReconcileAcmeDNSResponse
- type ReconcileProxyRequest
- type ReconcileProxyResponse
- type ReconcileServiceRequest
- type ReconcileServiceResponse
- type RegistryAuth
- type RemoveServiceRequest
- type RemoveServiceResponse
- type RunHookRequest
- type RunHookResponse
- type RunOneOffRequest
- type Server
- type ServerOptions
- type StateDocumentRequest
- type StateDocumentResponse
- func AppendStateEvent(ctx context.Context, dataDir string, req StateDocumentRequest) (*StateDocumentResponse, error)
- func ReadStateDocument(ctx context.Context, dataDir string, req StateDocumentRequest) (*StateDocumentResponse, error)
- func WriteStateDocument(ctx context.Context, dataDir string, req StateDocumentRequest) (*StateDocumentResponse, error)
- type StatsRequest
- type StatsResponse
- type Status
- type VolumeInspectRequest
- type VolumeInspectResponse
- type VolumeListRequest
- type VolumeListResponse
- type VolumeRemoveRequest
- type VolumeRemoveResponse
- type VolumeSummary
Constants ¶
View Source
const ( BackupDir = "/var/lib/tako/backups" DefaultRetention = 7 )
View Source
const ( HookPreDeploy = "preDeploy" HookPostDeploy = "postDeploy" )
View Source
const ( PortAllocationKindMeshUpstream = "mesh-upstream" PortAllocationKindHostBind = "host-bind" )
Variables ¶
This section is empty.
Functions ¶
func DeleteVolumeBackup ¶
func DeleteVolumeBackup(ctx context.Context, req BackupRequest) error
func ExecuteServiceCommand ¶
func ReadMeshStatus ¶
func RenderPrometheusMetrics ¶
func RenderPrometheusMetrics(ctx context.Context, req PrometheusMetricsRequest) (string, error)
func RestoreVolumeBackup ¶
func RestoreVolumeBackup(ctx context.Context, req BackupRequest) error
func RunOneOffCommand ¶
func StreamNodeLogs ¶
func StreamProxyAccessLogs ¶
func StreamServiceLogs ¶
Types ¶
type AcmeDNSCredentialsRequest ¶
type AcmeDNSCredentialsRequest struct {
Content string `json:"content"`
}
type AcmeDNSCredentialsResponse ¶
type AcmeDNSCredentialsResponse struct {
Content string `json:"content"`
}
func ReadAcmeDNSCredentials ¶
func ReadAcmeDNSCredentials() (*AcmeDNSCredentialsResponse, error)
func WriteAcmeDNSCredentials ¶
func WriteAcmeDNSCredentials(req AcmeDNSCredentialsRequest) (*AcmeDNSCredentialsResponse, error)
type AcmeDNSRegisterRequest ¶
type AcmeDNSRegisterResponse ¶
type AcmeDNSRegisterResponse struct {
Registration AcmeDNSRegistration `json:"registration"`
}
func RegisterAcmeDNS ¶
func RegisterAcmeDNS(ctx context.Context, req AcmeDNSRegisterRequest) (*AcmeDNSRegisterResponse, error)
type AcmeDNSRegistration ¶
type AcmeDNSRegistration struct {
Domain string `json:"domain"`
Subdomain string `json:"subdomain"`
Username string `json:"username"`
Password string `json:"password"`
FullDomain string `json:"fulldomain"`
CNAMETarget string `json:"cname_target"`
ServerIP string `json:"server_ip"`
CreatedAt time.Time `json:"created_at"`
}
type ActualRefreshTarget ¶
func ListActualRefreshTargets ¶
func ListActualRefreshTargets(dataDir string) ([]ActualRefreshTarget, error)
type ActualService ¶
type ActualService struct {
Name string `json:"name"`
Image string `json:"image,omitempty"`
Replicas int `json:"replicas"`
Containers []string `json:"containers,omitempty"`
ConfigHash string `json:"configHash,omitempty"`
RuntimeID string `json:"runtimeId,omitempty"`
HealthyReplicas int `json:"healthyReplicas,omitempty"`
UnhealthyReplicas int `json:"unhealthyReplicas,omitempty"`
StartingReplicas int `json:"startingReplicas,omitempty"`
NoHealthcheckReplicas int `json:"noHealthcheckReplicas,omitempty"`
UnknownHealthReplicas int `json:"unknownHealthReplicas,omitempty"`
}
type ActualStateResponse ¶
type ActualStateResponse struct {
Project string `json:"project"`
Environment string `json:"environment"`
Services map[string]*ActualService `json:"services"`
}
func GatherActualState ¶
func ParseActualState ¶
func ParseActualState(project string, environment string, dockerPSOutput string) *ActualStateResponse
type BackupCleanupResponse ¶
type BackupCleanupResponse struct {
Deleted int `json:"deleted"`
}
func CleanupOldBackups ¶
func CleanupOldBackups(ctx context.Context, req BackupRequest) (*BackupCleanupResponse, error)
type BackupInfo ¶
type BackupInfo struct {
ID string `json:"id"`
Service string `json:"service,omitempty"`
Volume string `json:"volume"`
Size int64 `json:"size"`
CreatedAt time.Time `json:"createdAt"`
Path string `json:"path"`
Compression string `json:"compression"`
}
func CreateVolumeBackup ¶
func CreateVolumeBackup(ctx context.Context, req BackupRequest) (*BackupInfo, error)
type BackupListResponse ¶
type BackupListResponse struct {
Backups []BackupInfo `json:"backups"`
}
func ListVolumeBackups ¶
func ListVolumeBackups(ctx context.Context, req BackupRequest) (*BackupListResponse, error)
type BackupRequest ¶
type CleanupRequest ¶
type CleanupRequest struct {
Project string `json:"project"`
Environment string `json:"environment,omitempty"`
RemoveContainers bool `json:"removeContainers,omitempty"`
RemoveImages bool `json:"removeImages,omitempty"`
RemoveNetworks bool `json:"removeNetworks,omitempty"`
RemoveDeployFiles bool `json:"removeDeployFiles,omitempty"`
RemoveTakodState bool `json:"removeTakodState,omitempty"`
ProxyFiles []string `json:"proxyFiles,omitempty"`
PruneDocker bool `json:"pruneDocker,omitempty"`
ImageRepositories []string `json:"imageRepositories,omitempty"`
KeepImages int `json:"keepImages,omitempty"`
CleanOldImages bool `json:"cleanOldImages,omitempty"`
CleanStoppedContainers bool `json:"cleanStoppedContainers,omitempty"`
CleanDanglingImages bool `json:"cleanDanglingImages,omitempty"`
CleanBuildCache bool `json:"cleanBuildCache,omitempty"`
CleanUnusedVolumes bool `json:"cleanUnusedVolumes,omitempty"`
SecureLogPermissions bool `json:"secureLogPermissions,omitempty"`
}
type CleanupResponse ¶
type CleanupResponse struct {
Project string `json:"project"`
Environment string `json:"environment,omitempty"`
ContainersRemoved int `json:"containersRemoved,omitempty"`
ImagesRemoved int `json:"imagesRemoved,omitempty"`
NetworksRemoved int `json:"networksRemoved,omitempty"`
ProxyFilesRemoved int `json:"proxyFilesRemoved,omitempty"`
BuildCacheCleaned bool `json:"buildCacheCleaned,omitempty"`
UnusedVolumesCleaned bool `json:"unusedVolumesCleaned,omitempty"`
LogPermissionsSecured bool `json:"logPermissionsSecured,omitempty"`
InitialDiskUsage string `json:"initialDiskUsage,omitempty"`
FinalDiskUsage string `json:"finalDiskUsage,omitempty"`
DockerDiskUsage string `json:"dockerDiskUsage,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
func CleanupProject ¶
func CleanupProject(ctx context.Context, req CleanupRequest) (*CleanupResponse, error)
type ConfigFileMount ¶
type ContainerSpec ¶
type ContainerStat ¶
type DisableProxyResponse ¶
type DisableProxyResponse struct {
Container string `json:"container"`
Removed bool `json:"removed"`
RouteFiles []string `json:"routeFiles,omitempty"`
}
func DisableProxy ¶
func DisableProxy(ctx context.Context) (*DisableProxyResponse, error)
type DiscoveryEndpoint ¶
type DiscoveryEndpoint struct {
Service string `json:"service"`
Container string `json:"container"`
ContainerID string `json:"containerId"`
Host string `json:"host"`
Port int `json:"port,omitempty"`
Address string `json:"address,omitempty"`
Scope string `json:"scope"`
Healthy bool `json:"healthy"`
}
type DiscoveryRequest ¶
type DiscoveryResponse ¶
type DiscoveryResponse struct {
Project string `json:"project"`
Environment string `json:"environment"`
Node string `json:"node,omitempty"`
Services []DiscoveryService `json:"services"`
Endpoints []DiscoveryEndpoint `json:"endpoints,omitempty"`
}
func ResolveDiscovery ¶
func ResolveDiscovery(ctx context.Context, req DiscoveryRequest, nodeName string) (*DiscoveryResponse, error)
type DiscoveryService ¶
type DiscoveryService struct {
Service string `json:"service"`
Endpoints []DiscoveryEndpoint `json:"endpoints"`
}
type DockerNodeInfo ¶
type DockerNodeInfo struct {
OSType string `json:"osType,omitempty"`
Architecture string `json:"architecture,omitempty"`
OperatingSystem string `json:"operatingSystem,omitempty"`
ServerVersion string `json:"serverVersion,omitempty"`
Driver string `json:"driver,omitempty"`
CgroupDriver string `json:"cgroupDriver,omitempty"`
DefaultRuntime string `json:"defaultRuntime,omitempty"`
RootDir string `json:"rootDir,omitempty"`
}
type EnvBundleRequest ¶
type EnvBundleResponse ¶
type EnvBundleResponse struct {
Found bool `json:"found"`
Content string `json:"content,omitempty"`
Path string `json:"path,omitempty"`
UpdatedAt time.Time `json:"updatedAt,omitempty"`
}
func ReadEnvBundle ¶
func ReadEnvBundle(ctx context.Context, dataDir string, req EnvBundleRequest) (*EnvBundleResponse, error)
func WriteEnvBundle ¶
func WriteEnvBundle(ctx context.Context, dataDir string, req EnvBundleRequest) (*EnvBundleResponse, error)
type ExecStreamRequest ¶
type ExecTargetRequest ¶
type ExecTargetResponse ¶
type ExecTargetResponse struct {
Project string `json:"project"`
Environment string `json:"environment"`
Service string `json:"service"`
Slot int `json:"slot,omitempty"`
Container string `json:"container"`
ContainerID string `json:"containerId"`
}
func ResolveExecTarget ¶
func ResolveExecTarget(ctx context.Context, req ExecTargetRequest) (*ExecTargetResponse, error)
type HealthSpec ¶
type ImageBuildOptions ¶
type ImageBuildResponse ¶
type ImageBuildResponse struct {
Image string `json:"image"`
Output string `json:"output,omitempty"`
}
func BuildImage ¶
func BuildImageWithOptions ¶
func BuildImageWithOptions(ctx context.Context, image string, opts ImageBuildOptions, r io.Reader) (*ImageBuildResponse, error)
type ImageExistsResponse ¶
func ImageExists ¶
func ImageExists(ctx context.Context, image string) (*ImageExistsResponse, error)
type ImageImportResponse ¶
type ImageImportResponse struct {
Image string `json:"image"`
Output string `json:"output,omitempty"`
}
func ImportImage ¶
type ImageListRequest ¶
type ImageListResponse ¶
type ImageListResponse struct {
Project string `json:"project"`
Environment string `json:"environment,omitempty"`
Images []ImageSummary `json:"images"`
}
func ListImages ¶
func ListImages(ctx context.Context, req ImageListRequest) (*ImageListResponse, error)
type ImagePruneRequest ¶
type ImagePruneResponse ¶
type ImagePruneResponse struct {
Project string `json:"project"`
Environment string `json:"environment,omitempty"`
Removed []string `json:"removed"`
Skipped []string `json:"skipped,omitempty"`
}
func PruneImages ¶
func PruneImages(ctx context.Context, req ImagePruneRequest) (*ImagePruneResponse, error)
type ImageRemoveRequest ¶
type ImageRemoveResponse ¶
type ImageRemoveResponse struct {
Project string `json:"project"`
Environment string `json:"environment,omitempty"`
Removed []string `json:"removed"`
}
func RemoveImages ¶
func RemoveImages(ctx context.Context, req ImageRemoveRequest) (*ImageRemoveResponse, error)
type ImageSummary ¶
type InspectContainer ¶
type InspectContainer struct {
ID string `json:"id"`
ShortID string `json:"shortId"`
Name string `json:"name"`
Service string `json:"service"`
Slot int `json:"slot,omitempty"`
Image string `json:"image,omitempty"`
ImageID string `json:"imageId,omitempty"`
State string `json:"state"`
Running bool `json:"running"`
Health string `json:"health,omitempty"`
ExitCode int `json:"exitCode,omitempty"`
StartedAt string `json:"startedAt,omitempty"`
FinishedAt string `json:"finishedAt,omitempty"`
ConfigHash string `json:"configHash,omitempty"`
RuntimeID string `json:"runtimeId,omitempty"`
Ports []InspectPort `json:"ports,omitempty"`
Mounts []InspectMount `json:"mounts,omitempty"`
Networks []InspectNetwork `json:"networks,omitempty"`
}
type InspectMount ¶
type InspectNetwork ¶
type InspectPort ¶
type InspectRequest ¶
type InspectResponse ¶
type InspectResponse struct {
Project string `json:"project"`
Environment string `json:"environment"`
Node string `json:"node,omitempty"`
Services []InspectService `json:"services"`
Containers []InspectContainer `json:"containers,omitempty"`
}
func InspectProject ¶
func InspectProject(ctx context.Context, req InspectRequest, nodeName string) (*InspectResponse, error)
type InspectService ¶
type InspectService struct {
Service string `json:"service"`
Containers []InspectContainer `json:"containers"`
}
type LeaseRequest ¶
type LeaseResponse ¶
type LeaseResponse struct {
Acquired bool `json:"acquired"`
Found bool `json:"found"`
Lease *LeaseInfo `json:"lease,omitempty"`
Message string `json:"message,omitempty"`
}
func AcquireLease ¶
func AcquireLease(ctx context.Context, dataDir string, req LeaseRequest) (*LeaseResponse, error)
func ReadLease ¶
func ReadLease(ctx context.Context, dataDir string, req LeaseRequest) (*LeaseResponse, error)
func ReleaseLease ¶
func ReleaseLease(ctx context.Context, dataDir string, req LeaseRequest) (*LeaseResponse, error)
type LogsRequest ¶
type MeshApplyRequest ¶
type MeshApplyResponse ¶
type MeshApplyResponse struct {
Applied bool `json:"applied"`
Status *mesh.Status `json:"status,omitempty"`
}
func ReconcileMesh ¶
func ReconcileMesh(ctx context.Context, request MeshApplyRequest) (*MeshApplyResponse, error)
type MeshKeyResponse ¶
type MeshKeyResponse struct {
PublicKey string `json:"publicKey"`
}
func EnsureMeshKey ¶
func EnsureMeshKey(ctx context.Context) (*MeshKeyResponse, error)
type MeshRTTRequest ¶
type MeshRTTResponse ¶
type MeshRTTResponse struct {
Target string `json:"target"`
Count int `json:"count"`
Sent int `json:"sent"`
Received int `json:"received"`
LossPercent float64 `json:"lossPercent"`
MinMS float64 `json:"minMs,omitempty"`
AvgMS float64 `json:"avgMs,omitempty"`
MaxMS float64 `json:"maxMs,omitempty"`
Reachable bool `json:"reachable"`
}
func MeasureMeshRTT ¶
func MeasureMeshRTT(ctx context.Context, req MeshRTTRequest) (*MeshRTTResponse, error)
type MetadataRequest ¶
type MetadataResponse ¶
type MetadataResponse struct {
NodePath string `json:"nodePath,omitempty"`
PeersPath string `json:"peersPath,omitempty"`
}
func WriteMetadata ¶
func WriteMetadata(ctx context.Context, dataDir string, req MetadataRequest) (*MetadataResponse, error)
type MetricsResponse ¶
type MetricsResponse struct {
Collected bool `json:"collected"`
Metrics json.RawMessage `json:"metrics"`
}
func ReadNodeMetrics ¶
func ReadNodeMetrics(ctx context.Context, collect bool) (*MetricsResponse, error)
type NodeInfoResponse ¶
type NodeInfoResponse struct {
Node string `json:"node,omitempty"`
Hostname string `json:"hostname,omitempty"`
Platform string `json:"platform,omitempty"`
OS string `json:"os,omitempty"`
Architecture string `json:"architecture,omitempty"`
Docker DockerNodeInfo `json:"docker"`
BuildxAvailable bool `json:"buildxAvailable"`
BuildxVersion string `json:"buildxVersion,omitempty"`
}
type NodeLogsRequest ¶
type PortAllocationRequest ¶
type PortAllocationRequest struct {
Kind string `json:"kind"`
Project string `json:"project"`
Environment string `json:"environment"`
Service string `json:"service"`
Slot int `json:"slot"`
HostIP string `json:"hostIp"`
ContainerPort int `json:"containerPort"`
PreferredPort int `json:"preferredPort"`
MinPort int `json:"minPort"`
MaxPort int `json:"maxPort"`
}
type PortAllocationResponse ¶
type PortAllocationResponse struct {
Kind string `json:"kind"`
Project string `json:"project"`
Environment string `json:"environment"`
Service string `json:"service"`
Slot int `json:"slot"`
HostIP string `json:"hostIp"`
HostPort int `json:"hostPort"`
ContainerPort int `json:"containerPort"`
Key string `json:"key"`
}
func AllocatePort ¶
func AllocatePort(ctx context.Context, dataDir string, req PortAllocationRequest) (*PortAllocationResponse, error)
type ProxyFileRequest ¶
type ProxyFileResponse ¶
type ProxyFileResponse struct {
Path string `json:"path"`
}
func RemoveProxyFile ¶
func RemoveProxyFile(ctx context.Context, name string) (*ProxyFileResponse, error)
func WriteProxyFile ¶
func WriteProxyFile(ctx context.Context, req ProxyFileRequest) (*ProxyFileResponse, error)
type ProxyTargetRequest ¶
type ProxyTargetResponse ¶
type ProxyTargetResponse struct {
Project string `json:"project"`
Environment string `json:"environment"`
Service string `json:"service"`
Container string `json:"container"`
ContainerID string `json:"containerId"`
Host string `json:"host"`
Port int `json:"port"`
Address string `json:"address"`
}
func ResolveProxyTarget ¶
func ResolveProxyTarget(ctx context.Context, req ProxyTargetRequest) (*ProxyTargetResponse, error)
type ReconcileAcmeDNSRequest ¶
type ReconcileAcmeDNSResponse ¶
type ReconcileAcmeDNSResponse struct {
Container string `json:"container"`
Image string `json:"image"`
}
func ReconcileAcmeDNS ¶
func ReconcileAcmeDNS(ctx context.Context, req ReconcileAcmeDNSRequest) (*ReconcileAcmeDNSResponse, error)
func RemoveAcmeDNS ¶
func RemoveAcmeDNS(ctx context.Context) (*ReconcileAcmeDNSResponse, error)
type ReconcileProxyRequest ¶
type ReconcileProxyResponse ¶
type ReconcileProxyResponse struct {
Container string `json:"container"`
Image string `json:"image"`
}
func ReconcileProxy ¶
func ReconcileProxy(ctx context.Context, req ReconcileProxyRequest) (*ReconcileProxyResponse, error)
type ReconcileServiceRequest ¶
type ReconcileServiceRequest struct {
Project string `json:"project"`
Environment string `json:"environment"`
Service string `json:"service"`
Image string `json:"image"`
PullImage bool `json:"pullImage,omitempty"`
RegistryAuth *RegistryAuth `json:"registryAuth,omitempty"`
Restart string `json:"restart,omitempty"`
Network string `json:"network"`
NetworkAlias string `json:"networkAlias,omitempty"`
NetworkAliases []string `json:"networkAliases,omitempty"`
EnvFile string `json:"envFile,omitempty"`
EnvFileContent string `json:"envFileContent,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Mounts []string `json:"mounts,omitempty"`
ConfigFiles []ConfigFileMount `json:"configFiles,omitempty"`
ConfigDir string `json:"-"`
Containers []ContainerSpec `json:"containers"`
Health *HealthSpec `json:"health,omitempty"`
Command string `json:"command,omitempty"`
Strategy string `json:"strategy,omitempty"`
Order string `json:"order,omitempty"`
Monitor string `json:"monitor,omitempty"`
}
type ReconcileServiceResponse ¶
type ReconcileServiceResponse struct {
Project string `json:"project"`
Environment string `json:"environment"`
Service string `json:"service"`
Containers []string `json:"containers"`
RemovedContainers int `json:"removedContainers,omitempty"`
}
func ReconcileService ¶
func ReconcileService(ctx context.Context, req ReconcileServiceRequest) (*ReconcileServiceResponse, error)
type RegistryAuth ¶
type RemoveServiceRequest ¶
type RemoveServiceResponse ¶
type RemoveServiceResponse struct {
Project string `json:"project"`
Environment string `json:"environment"`
Service string `json:"service"`
RemovedContainers int `json:"removedContainers"`
}
func RemoveService ¶
func RemoveService(ctx context.Context, req RemoveServiceRequest) (*RemoveServiceResponse, error)
type RunHookRequest ¶
type RunHookRequest struct {
Project string `json:"project"`
Environment string `json:"environment"`
Service string `json:"service"`
Hook string `json:"hook"`
Image string `json:"image"`
PullImage bool `json:"pullImage,omitempty"`
RegistryAuth *RegistryAuth `json:"registryAuth,omitempty"`
Network string `json:"network"`
EnvFile string `json:"-"`
EnvFileContent string `json:"envFileContent,omitempty"`
Mounts []string `json:"mounts,omitempty"`
Command []string `json:"command,omitempty"`
User string `json:"user,omitempty"`
WorkingDir string `json:"workingDir,omitempty"`
Timeout string `json:"timeout,omitempty"`
}
type RunHookResponse ¶
type RunHookResponse struct {
Project string `json:"project"`
Environment string `json:"environment"`
Service string `json:"service"`
Hook string `json:"hook"`
Container string `json:"container"`
ExitCode int `json:"exitCode"`
Error string `json:"error,omitempty"`
}
func RunHookCommand ¶
func RunHookCommand(ctx context.Context, req RunHookRequest) (*RunHookResponse, error)
type RunOneOffRequest ¶
type RunOneOffRequest struct {
Project string `json:"project"`
Environment string `json:"environment"`
Service string `json:"service"`
Image string `json:"image"`
PullImage bool `json:"pullImage,omitempty"`
RegistryAuth *RegistryAuth `json:"registryAuth,omitempty"`
Network string `json:"network"`
EnvFile string `json:"-"`
EnvFileContent string `json:"envFileContent,omitempty"`
Mounts []string `json:"mounts,omitempty"`
Command []string `json:"command,omitempty"`
Stdin bool `json:"stdin,omitempty"`
TTY bool `json:"tty,omitempty"`
Remove bool `json:"remove,omitempty"`
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServerWithOptions ¶
func NewServerWithOptions(socket string, dataDir string, version string, opts ServerOptions) *Server
type ServerOptions ¶
type StateDocumentRequest ¶
type StateDocumentResponse ¶
type StateDocumentResponse struct {
Found bool `json:"found"`
Content string `json:"content,omitempty"`
Path string `json:"path,omitempty"`
}
func AppendStateEvent ¶
func AppendStateEvent(ctx context.Context, dataDir string, req StateDocumentRequest) (*StateDocumentResponse, error)
func ReadStateDocument ¶
func ReadStateDocument(ctx context.Context, dataDir string, req StateDocumentRequest) (*StateDocumentResponse, error)
func WriteStateDocument ¶
func WriteStateDocument(ctx context.Context, dataDir string, req StateDocumentRequest) (*StateDocumentResponse, error)
type StatsRequest ¶
type StatsResponse ¶
type StatsResponse struct {
Stats []ContainerStat `json:"stats"`
}
func ReadContainerStats ¶
func ReadContainerStats(ctx context.Context, req StatsRequest) (*StatsResponse, error)
type Status ¶
type Status struct {
Runtime string `json:"runtime"`
Version string `json:"version"`
Hostname string `json:"hostname"`
Socket string `json:"socket"`
DataDir string `json:"dataDir"`
StartedAt time.Time `json:"startedAt"`
Now time.Time `json:"now"`
Node map[string]any `json:"node,omitempty"`
Peers map[string]any `json:"peers,omitempty"`
}
type VolumeInspectRequest ¶
type VolumeInspectResponse ¶
type VolumeInspectResponse struct {
Project string `json:"project"`
Environment string `json:"environment"`
Volumes map[string]bool `json:"volumes"`
}
func InspectVolumes ¶
func InspectVolumes(ctx context.Context, req VolumeInspectRequest) (*VolumeInspectResponse, error)
type VolumeListRequest ¶
type VolumeListResponse ¶
type VolumeListResponse struct {
Project string `json:"project"`
Environment string `json:"environment"`
Volumes []VolumeSummary `json:"volumes"`
}
func ListVolumes ¶
func ListVolumes(ctx context.Context, req VolumeListRequest) (*VolumeListResponse, error)
type VolumeRemoveRequest ¶
type VolumeRemoveResponse ¶
type VolumeRemoveResponse struct {
Project string `json:"project"`
Environment string `json:"environment"`
Removed []string `json:"removed"`
Skipped []string `json:"skipped,omitempty"`
}
func RemoveVolumes ¶
func RemoveVolumes(ctx context.Context, req VolumeRemoveRequest) (*VolumeRemoveResponse, error)
type VolumeSummary ¶
Source Files
¶
- access_logs.go
- acmedns.go
- actual.go
- actual_refresh.go
- atomic_write.go
- backup.go
- cleanup.go
- discovery.go
- env_bundle.go
- exec.go
- hooks.go
- image.go
- inspect.go
- lease.go
- logs.go
- mesh.go
- mesh_rtt.go
- metadata.go
- metrics.go
- node_info.go
- node_logs.go
- output.go
- ports.go
- proxy.go
- proxy_file.go
- proxy_target.go
- reconcile.go
- registry_auth.go
- resources.go
- server.go
- state.go
- stats.go
- volumes.go
Click to show internal directories.
Click to hide internal directories.