adapterManager

package
v0.0.0-...-d6fd5ef Latest Latest
Warning

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

Go to latest
Published: May 31, 2017 License: Apache-2.0 Imports: 19 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, responseBag *attribute.MutableBag) rpc.Status

	// Check dispatches to the set of aspects associated with the Check API method
	Check(ctx context.Context, requestBag *attribute.MutableBag, responseBag *attribute.MutableBag) rpc.Status

	// Report dispatches to the set of aspects associated with the Report API method
	Report(ctx context.Context, requestBag *attribute.MutableBag, responseBag *attribute.MutableBag) rpc.Status

	// Quota dispatches to the set of aspects associated with the Quota API method
	Quota(ctx context.Context, requestBag *attribute.MutableBag, responseBag *attribute.MutableBag,
		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) Check

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

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

func (*Manager) ConfigChange

func (m *Manager) ConfigChange(cfg config.Resolver, df descriptor.Finder)

ConfigChange listens for config change notifications.

func (*Manager) Preprocess

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

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

func (*Manager) Quota

func (m *Manager) Quota(ctx context.Context, requestBag, responseBag *attribute.MutableBag,
	qma *aspect.QuotaMethodArgs) (*aspect.QuotaMethodResp, rpc.Status)

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

func (*Manager) Report

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

Report dispatches to the set of aspects associated with the Report 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