Back to godoc.org

Package handler

v0.0.0-...-4638b96
Latest Go to latest

The latest major version is .

Published: Jan 7, 2020 | License: Apache-2.0 | Module: github.com/Maistra/istio

Index

func NewEnv

func NewEnv(cfgID int64, name string, gp *pool.GoroutinePool, mrc controller.MemberRollController, namespaces []string) adapter.Env

NewEnv returns a new environment instance.

type Entry

type Entry struct {
	// Name of the Handler
	Name string

	// Handler is the initialized Handler object.
	Handler adapter.Handler

	// AdapterName that was used to create this Entry.
	AdapterName string

	// Signature of the configuration used to create this entry.
	Signature signature
	// contains filtered or unexported fields
}

Entry in the handler table.

type Table

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

Table contains a set of instantiated and configured adapter handlers.

func Empty

func Empty() *Table

Empty returns an empty table instance.

func NewTable

func NewTable(old *Table, snapshot *config.Snapshot, gp *pool.GoroutinePool, mrc controller.MemberRollController,
	namespaces []string) *Table

NewTable returns a new table, based on the given config snapshot. The table will re-use existing handlers as much as possible from the old table.

func (*Table) Cleanup

func (t *Table) Cleanup(current *Table)

Cleanup the old table by selectively closing handlers that are not used in the given table. The cleanup method is called on the "old" table, and the "current" table (that is based on the new config) is passed as a parameter. The Cleanup method selectively closes all adapters that are not used by the current table. This method will use perf counters on current will be used, instead of the perf counters on t. This ensures that appropriate config id dimension is used when reporting metrics.

func (*Table) Get

func (t *Table) Get(handlerName string) (Entry, bool)

Get returns the entry for a Handler with the given name, if it exists.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier