ropts

package
v0.0.0-...-8b9b725 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: MIT, MIT Imports: 0 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(opts *Options) error

Option is a single routing option.

var Expired Option = func(opts *Options) error {
	opts.Expired = true
	return nil
}

Expired is an option that tells the routing system to return expired records when no newer records are known.

var Offline Option = func(opts *Options) error {
	opts.Offline = true
	return nil
}

Offline is an option that tells the routing system to operate offline (i.e., rely on cached/local data only).

type Options

type Options struct {
	// Allow expired values.
	Expired bool
	Offline bool
	// Other (ValueStore implementation specific) options.
	Other map[interface{}]interface{}
}

Options is a set of routing options

func (*Options) Apply

func (opts *Options) Apply(options ...Option) error

Apply applies the given options to this Options

func (*Options) ToOption

func (opts *Options) ToOption() Option

ToOption converts this Options to a single Option.

Jump to

Keyboard shortcuts

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