v1

package
v0.9.2-45-g2490458b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

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

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) Create

func (client *ComposeServiceHandler) Create(ctx context.Context, req *Compose) (*Compose, error)

Create implements ComposeService

func (*ComposeServiceHandler) Delete

func (client *ComposeServiceHandler) Delete(ctx context.Context, req *Compose) (*Compose, error)

Delete implements ComposeService

func (*ComposeServiceHandler) Get

func (client *ComposeServiceHandler) Get(ctx context.Context, req *Compose) (*Compose, error)

Get implements ComposeService

func (*ComposeServiceHandler) List

func (client *ComposeServiceHandler) List(ctx context.Context, req *ComposeList) (*ComposeList, error)

List implements ComposeService

func (*ComposeServiceHandler) Update

func (client *ComposeServiceHandler) Update(ctx context.Context, req *Compose) (*Compose, error)

Update 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL