adapterManager

package
v0.0.0-...-5253b6b Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aspects

Aspects returns a fully constructed manager table, indexed by config.Kind.

Types

type AspectDispatcher

type AspectDispatcher interface {

	// Preprocess dispatches to the set of aspects that will run before any
	// other aspects in Mixer (aka: the Check, Report, Quota aspects).
	Preprocess(ctx context.Context, requestBag attribute.Bag, responseBag *attribute.MutableBag) rpc.Status

	// Quota dispatches to the set of aspects associated with the Quota API method
	Quota(ctx context.Context, requestBag attribute.Bag,
		qma *aspect.QuotaMethodArgs) (*aspect.QuotaMethodResp, rpc.Status)
}

AspectDispatcher executes aspects associated with individual API methods

type BuilderInfo

type BuilderInfo struct {
	// Builder is the builder of interest.
	Builder adapter.Builder

	// Kinds specifies the aspect kinds that this builder is capable of handling.
	Kinds config.KindSet
}

BuilderInfo provides information about an individual builder.

type BuildersByName

type BuildersByName map[string]*BuilderInfo

BuildersByName holds a set of builders indexed by their name.

func BuilderMap

func BuilderMap(builders []adapter.RegisterFn) BuildersByName

BuilderMap returns the known builders, indexed by kind.

type Manager

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

Manager manages all aspects - provides uniform interface to all aspect managers

func NewManager

func NewManager(builders []adapter.RegisterFn, inventory aspect.ManagerInventory,
	exp expr.Evaluator, gp *pool.GoroutinePool, adapterGP *pool.GoroutinePool) *Manager

NewManager creates a new adapterManager.

func (*Manager) AspectValidatorFinder

func (m *Manager) AspectValidatorFinder(kind config.Kind) (config.AspectValidator, bool)

AspectValidatorFinder returns a BuilderValidatorFinder for aspects.

func (*Manager) BuilderValidatorFinder

func (m *Manager) BuilderValidatorFinder(name string) (adapter.ConfigValidator, bool)

BuilderValidatorFinder returns a BuilderValidatorFinder for builders.

func (*Manager) ConfigChange

func (m *Manager) ConfigChange(cfg config.Resolver, df descriptor.Finder, handlers map[string]*config.HandlerInfo)

ConfigChange listens for config change notifications.

func (*Manager) Preprocess

func (m *Manager) Preprocess(ctx context.Context, requestBag attribute.Bag, responseBag *attribute.MutableBag) rpc.Status

Preprocess dispatches to the set of aspects that must run before any other configured aspects.

func (*Manager) Quota

Quota dispatches to the set of aspects associated with the Quota API method

func (*Manager) SupportedKinds

func (m *Manager) SupportedKinds(builder string) config.KindSet

SupportedKinds returns the set of aspect kinds supported by the builder

Jump to

Keyboard shortcuts

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