policy

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewManager

func NewManager(configFile string, logger zLogger.ZLogger) *Manager

func (*Manager) Get

func (m *Manager) Get(id string) (*Policy, bool)

func (*Manager) Start

func (m *Manager) Start(wg *sync.WaitGroup) error

func (*Manager) Stop

func (m *Manager) Stop()

type Policy

type Policy struct {
	Name   string        `json:"name" toml:"name" yaml:"name"`
	URIs   []string      `json:"uris" toml:"uris" yaml:"uris"`
	DNS    []string      `json:"dns" toml:"dns" yaml:"dns"`
	IPs    []string      `json:"ips" toml:"ips" yaml:"ips"`
	MaxTTL time.Duration `json:"maxttl" toml:"maxttl" yaml:"maxttl"`
}

func NewPolicy

func NewPolicy(name string, uris []string, dns []string, ips []string, maxTTL time.Duration) *Policy

Jump to

Keyboard shortcuts

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