core

package
v0.0.0-...-27d56bb Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package shared contains shared data between the host and plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook interface {
	// GetManifest returns the manifest of the plugin.
	GetManifest() (Manifest, error)

	// GetStatus returns the status of the plugin.
	GetStatus() (Status, error)

	// OnStage is called when the plugin is in a certain stage.
	OnStage(stage string)
}

type Manifest

type Manifest struct {
	Name        string
	Version     string
	Author      string
	Repository  string
	Permissions Permissions
}

type Permissions

type Permissions []string

Permissions is a list of permissions that a plugin requires.

This is used to determine if a plugin is allowed to run. runtime will check if the host has the required permissions before starting the plugin.

type Status

type Status struct {
	// Specifies whether the module is ready or not.
	//
	// The expected value is true, which tells the runtime
	// that the module is ready to be served.
	//
	// The runtime also gets the state of the module
	// five times in the first two-second interval.
	//
	// It then tries five more times at 10-second intervals,
	// and if the IsReady field is still not true,
	// it closes the module.
	//
	// So for an initial setup where you expect a long job (>1 minute),
	// just do the basics and set IsReady to true, and create another
	// boolean flag to handle it.
	IsReady bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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