Help us shape the future of Go! Take the 2026 Go Developer Survey

runtimeexecutor

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectName        = "baseharbor-runtime-executor"
	ServiceName        = "executor"
	ControlNetworkName = "baseharbor-runtime-control"
	ExecutorURL        = "https://baseharbor-runtime-executor:9443"
	DefaultImage       = "ghcr.io/mcpdev80/baseharbor-runtime:edge"
)
View Source
const ObjectStorageS3V1 = "object-storage.s3/v1"

Variables

This section is empty.

Functions

func DestroyShared

func DestroyShared(ctx context.Context, runtime Runtime, dataDir string) error

func Run

func Run(ctx context.Context, cfg Config) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg ClientConfig) (*Client, error)

func (*Client) Check

func (c *Client) Check(ctx context.Context) error

func (*Client) Execute

func (*Client) Resolve

func (c *Client) Resolve(ctx context.Context, capability, operation, name string) (ExecuteResponse, error)

type ClientConfig

type ClientConfig struct {
	URL      string
	CAFile   string
	CertFile string
	KeyFile  string
}

type Config

type Config struct {
	ListenAddr       string
	TLSCertFile      string
	TLSKeyFile       string
	TLSClientCAFile  string
	S3Endpoint       string
	AdminCredentials string
	StateDir         string
	ShutdownTimeout  time.Duration
}

func (Config) Validate

func (c Config) Validate() error

type ExecuteRequest

type ExecuteRequest struct {
	Capability string `json:"capability"`
	Operation  string `json:"operation"`
	Name       string `json:"name"`
}

type ExecuteResponse

type ExecuteResponse struct {
	ResourceID string                                `json:"resource_id,omitempty"`
	Binding    *objectstorage.RuntimeResourceBinding `json:"binding,omitempty"`
}

type Files

type Files struct {
	Dir     string
	Compose string
	Env     string
	Image   string
}

func EnsureFiles

func EnsureFiles(dataDir string, identity openbao.RuntimeExecutorMTLSFiles, adminCredentialsPath string) (Files, error)

func ExistingFiles

func ExistingFiles(dataDir string) (Files, error)

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(resources ResourceManager) (*Handler, error)

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ResourceManager

type ResourceManager interface {
	Create(ctx context.Context, application, environment, name string) (objectstorage.RuntimeResourceBinding, error)
	Get(ctx context.Context, application, environment, name string) (objectstorage.RuntimeResourceBinding, error)
	Delete(ctx context.Context, application, environment, name string) error
}

type Runtime

type Runtime interface {
	DestroyProject(context.Context, string, string, string) error
}

Jump to

Keyboard shortcuts

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