serve

package
v4.6.4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MPL-2.0 Imports: 42 Imported by: 58

Documentation

Index

Constants

View Source
const (
	MaxMsgSize = 100 * 1024 * 1024 // 100 MiB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manifest added in v4.5.0

type Manifest struct {
	Name             string               `json:"name"`
	Version          string               `json:"version"`
	Title            string               `json:"title"`
	ShortDescription string               `json:"short_description"`
	Description      string               `json:"description"`
	Categories       []string             `json:"categories"`
	Protocols        []int                `json:"protocols"`
	SupportedTargets []plugin.BuildTarget `json:"supported_targets"`
	PackageType      PackageType          `json:"package_type"`
}

manifest is the plugin.json file inside the dist directory. It is used by CloudQuery registry to be able to publish the plugin with all the needed metadata.

type PackageType added in v4.5.0

type PackageType string
const (
	PackageTypeNative PackageType = "native"
	PackageTypeDocker PackageType = "docker"
)

type PluginOption

type PluginOption func(*PluginServe)

func WithArgs

func WithArgs(args ...string) PluginOption

WithArgs used to serve the plugin with predefined args instead of os.Args

func WithDestinationV0V1Server

func WithDestinationV0V1Server() PluginOption

WithDestinationV0V1Server is used to include destination v0 and v1 server to work with older sources

func WithPluginSentryDSN

func WithPluginSentryDSN(dsn string) PluginOption

func WithTestListener

func WithTestListener() PluginOption

WithTestListener means that the plugin will be served with an in-memory listener available via testListener() method instead of a network listener.

type PluginServe

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

func Plugin

func Plugin(p *plugin.Plugin, opts ...PluginOption) *PluginServe

func (*PluginServe) Serve

func (s *PluginServe) Serve(ctx context.Context) error

Jump to

Keyboard shortcuts

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