script

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: GPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultInterval = 5 * time.Minute
View Source
const Type = "script"

Variables

This section is empty.

Functions

func NewScript

func NewScript(ctx context.Context, _ adapter.Core, logger log.Logger, tag string, args any) (adapter.PluginMatcher, error)

Types

type Args

type Args struct {
	Command  string                 `json:"command"`
	Args     utils.Listable[string] `json:"args"`
	Interval utils.Duration         `json:"interval"`
}

type Script

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

func (*Script) APIHandler

func (s *Script) APIHandler() chi.Router

func (*Script) Close

func (s *Script) Close() error

func (*Script) LoadRunningArgs

func (s *Script) LoadRunningArgs(_ context.Context, _ any) (uint16, error)

func (*Script) Match

func (s *Script) Match(ctx context.Context, dnsCtx *adapter.DNSContext, _ uint16) (bool, error)

func (*Script) Start

func (s *Script) Start() error

func (*Script) Tag

func (s *Script) Tag() string

func (*Script) Type

func (s *Script) Type() string

Jump to

Keyboard shortcuts

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