hacks

package
v0.0.0-...-c8e46ad Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterMisdirectedRequests

func FilterMisdirectedRequests(fqdn string) *bootstrap.HTTPFilter

func HackLuaFilter

func HackLuaFilter(spec Spec) xds.Snapshot

HackLuaFilter ...

func HackTCPProxy

func HackTCPProxy(spec Spec) xds.Snapshot

HackTCPProxy ...

func NewVersion

func NewVersion() string

NewVersion returns a unique version string.

func RandomStringN

func RandomStringN(length int) string

RandomStringN ...

Types

type Parameter

type Parameter string

Parameter is a param value represented as a string.

func (Parameter) AsBool

func (p Parameter) AsBool() (bool, error)

AsBool ...

func (Parameter) AsInt64

func (p Parameter) AsInt64() (int64, error)

AsInt64 ...

func (Parameter) AsString

func (p Parameter) AsString() (string, error)

AsString ...

func (Parameter) IP

func (p Parameter) IP() (net.IP, error)

IP ...

func (Parameter) Or

func (p Parameter) Or(or string) Parameter

Or returns the default if the parameter is empty.

type Spec

type Spec struct {
	Hack       string
	Parameters map[string]Parameter
}

Spec describes a parameterized hack to run.

func ParseSpec

func ParseSpec(specString string) (Spec, error)

ParseSpec parses a policy specification string. A policy specification string is of the form:

OPERATION[:PARAM=VALUE[,PARAM=VALUE]...]

Jump to

Keyboard shortcuts

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