hosts

package
v0.0.0-...-b4268f6 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPCPluginHostMapper

func NewGRPCPluginHostMapper(name string, addr string, opts ...plugin.Option) hosts.HostMapper

NewGRPCPluginHostMapper creates a HostMapper plugin based on gRPC.

func NewHTTPPluginHostMapper

func NewHTTPPluginHostMapper(name string, url string, opts ...plugin.Option) hosts.HostMapper

NewHTTPPluginHostMapper creates an HostMapper plugin based on HTTP.

func NewHostMapper

func NewHostMapper(opts ...Option) hosts.HostMapper

Types

type Mapping

type Mapping struct {
	Hostname string
	IP       net.IP
}

type Option

type Option func(opts *options)

func FileLoaderOption

func FileLoaderOption(fileLoader loader.Loader) Option

func HTTPLoaderOption

func HTTPLoaderOption(httpLoader loader.Loader) Option

func LoggerOption

func LoggerOption(logger logger.Logger) Option

func MappingsOption

func MappingsOption(mappings []Mapping) Option

func PluginConnOption

func PluginConnOption(c *grpc.ClientConn) Option

func RedisLoaderOption

func RedisLoaderOption(redisLoader loader.Loader) Option

func ReloadPeriodOption

func ReloadPeriodOption(period time.Duration) Option

Jump to

Keyboard shortcuts

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