Documentation ¶
Overview ¶
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2024, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
Index ¶
- type Compose
- type ComposeList
- type ComposeService
- type ComposeServiceHandler
- func (client *ComposeServiceHandler) Create(ctx context.Context, req *Compose) (*Compose, error)
- func (client *ComposeServiceHandler) Delete(ctx context.Context, req *Compose) (*Compose, error)
- func (client *ComposeServiceHandler) Get(ctx context.Context, req *Compose) (*Compose, error)
- func (client *ComposeServiceHandler) List(ctx context.Context, req *ComposeList) (*ComposeList, error)
- func (client *ComposeServiceHandler) Update(ctx context.Context, req *Compose) (*Compose, error)
- type ComposeSpec
- type ComposeStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compose ¶
type Compose = zip.Object[ComposeSpec, ComposeStatus]
Compose is the mutable API object that represents a compose project.
type ComposeList ¶
type ComposeList = zip.ObjectList[ComposeSpec, ComposeStatus]
ComposeList is the mutable API object that represents a list of compose projects.
type ComposeService ¶
type ComposeService interface { Create(ctx context.Context, req *Compose) (*Compose, error) Delete(ctx context.Context, req *Compose) (*Compose, error) Get(ctx context.Context, req *Compose) (*Compose, error) List(ctx context.Context, req *ComposeList) (*ComposeList, error) Update(ctx context.Context, req *Compose) (*Compose, error) }
ComposeService is the interface of available methods
func NewComposeServiceHandler ¶
func NewComposeServiceHandler(ctx context.Context, impl ComposeService, opts ...zip.ClientOption) (ComposeService, error)
NewComposeServiceHandler returns a service based on an inline API client which essentially wraps the specific call, enabling pre- and post- call hooks. This is useful for wrapping the command with decorators, for example, a cache, error handlers, etc. Simultaneously, it enables access to the service via inline code without having to make invocations to an external handler.
type ComposeServiceHandler ¶
type ComposeServiceHandler struct {
// contains filtered or unexported fields
}
ComposeServiceHandler provides a Zip API Object Framework service for a Unikraft project.
func (*ComposeServiceHandler) List ¶
func (client *ComposeServiceHandler) List(ctx context.Context, req *ComposeList) (*ComposeList, error)
List implements ComposeService
type ComposeSpec ¶
type ComposeSpec struct { Workdir string `json:"workdir,omitempty"` Composefile string `json:"composefile,omitempty"` }
ComposeSpec uniquely identifies a compose project.
type ComposeStatus ¶
type ComposeStatus struct { Machines []v1.ObjectMeta `json:"machines,omitempty"` Networks []v1.ObjectMeta `json:"networks,omitempty"` Volumes []v1.ObjectMeta `json:"volumes,omitempty"` }
ComposeStatus contains the complete status of the compose project.