plugins

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(path string) (string, error)

Build will use `go build -buildmode=plugin` to build a Plugin and return the path to the .so file

func Run

func Run(ctx context.Context, run RunFunc, getter IPGetter, subdomain string) error

Types

type IPGetter

type IPGetter interface {
	GetIP(ctx context.Context, subdomain string) (string, error)
}

type RunFunc

type RunFunc func(context.Context, string) error

func Load

func Load(fname string) (RunFunc, error)

func LoadMainWithIPEnvVar

func LoadMainWithIPEnvVar(fname, ipEnvVar string) (RunFunc, error)

Jump to

Keyboard shortcuts

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