serve

package
v4.25.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MPL-2.0 Imports: 49 Imported by: 94 modules, 91 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type PackageJSON added in v4.8.0

type PackageJSON struct {
	SchemaVersion    int                `json:"schema_version"`
	Team             string             `json:"team"`
	Kind             plugin.Kind        `json:"kind"`
	Name             string             `json:"name"`
	Message          string             `json:"message"`
	Version          string             `json:"version"`
	Protocols        []int              `json:"protocols"`
	SupportedTargets []TargetBuild      `json:"supported_targets"`
	PackageType      plugin.PackageType `json:"package_type"`
}

PackageJSON is the package.json file inside the dist directory. It is used by the CloudQuery package command to be able to package the plugin with all the needed metadata.

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

type TargetBuild added in v4.8.0

type TargetBuild struct {
	OS       string `json:"os"`
	Arch     string `json:"arch"`
	Path     string `json:"path"`
	Checksum string `json:"checksum"`
}

Jump to

Keyboard shortcuts

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