Documentation ¶
Index ¶
- type Environment
- type Flow
- type Registry
- func (r *Registry) Freeze()
- func (r *Registry) ListActions() []action.Desc
- func (r *Registry) ListFlows() []Flow
- func (r *Registry) LookupAction(key string) action.Action
- func (r *Registry) LookupTraceStore(env Environment) tracing.Store
- func (r *Registry) RegisterAction(typ atype.ActionType, a action.Action)
- func (r *Registry) RegisterFlow(f Flow)
- func (r *Registry) RegisterSpanProcessor(sp sdktrace.SpanProcessor)
- func (r *Registry) RegisterTraceStore(env Environment, ts tracing.Store)
- func (r *Registry) TracingState() *tracing.State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment string
An Environment is the execution context in which the program is running.
const ( EnvironmentDev Environment = "dev" // development: testing, debugging, etc. EnvironmentProd Environment = "prod" // production: user data, SLOs, etc. )
func CurrentEnvironment ¶
func CurrentEnvironment() Environment
CurentEnvironment returns the currently active environment.
type Flow ¶
type Flow interface{}
Flow is the type for the flows stored in a registry. Since a registry just remembers flows and returns them, this interface is empty.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
var Global *Registry
The global registry, used in non-test code. A test may create their own registries to avoid conflicting with other tests.
func (*Registry) ListActions ¶
ListActions returns a list of descriptions of all registered actions. The list is sorted by action name.
func (*Registry) LookupAction ¶
LookupAction returns the action for the given key, or nil if there is none.
func (*Registry) LookupTraceStore ¶
func (r *Registry) LookupTraceStore(env Environment) tracing.Store
func (*Registry) RegisterAction ¶
func (r *Registry) RegisterAction(typ atype.ActionType, a action.Action)
RegisterAction records the action in the registry. It panics if an action with the same type, provider and name is already registered.
func (*Registry) RegisterFlow ¶
RegisterFlow stores the flow for use by the production server (see [NewFlowServeMux]). It doesn't check for duplicates because registerAction will do that.
func (*Registry) RegisterSpanProcessor ¶
func (r *Registry) RegisterSpanProcessor(sp sdktrace.SpanProcessor)
func (*Registry) RegisterTraceStore ¶
func (r *Registry) RegisterTraceStore(env Environment, ts tracing.Store)