Documentation
¶
Index ¶
- Constants
- type Emitter
- func Compose(emitters ...Emitter) Emitter
- func NewMilestoneEmitter(instance, namespace, uri string) (Emitter, error)
- func NewMilestoneEmitterFromEnv(instance, namespace string) (Emitter, error)
- func NewTracingGatherer(ctx context.Context, namespace string, zipkinNamespace string, t feature.T) (Emitter, error)
- type Factory
- func (ef *Factory) Environment(env map[string]string) cloudevents.Event
- func (ef *Factory) Exception(reason, messageFormat string, messageA ...interface{}) cloudevents.Event
- func (ef *Factory) Finished() cloudevents.Event
- func (ef *Factory) NamespaceCreated(namespace string) cloudevents.Event
- func (ef *Factory) NamespaceDeleted(namespace string) cloudevents.Event
- func (ef *Factory) StepFinished(feature, stepName, timing, level, testName string, skipped, failed bool) cloudevents.Event
- func (ef *Factory) StepStarted(feature, stepName, timing, level, testName string) cloudevents.Event
- func (ef *Factory) StepsPlanned(feature string, steps map[string][]string, testName string) cloudevents.Event
- func (ef *Factory) TestFinished(feature, testName string, skipped, failed bool) cloudevents.Event
- func (ef *Factory) TestSetFinished(featureSet, testName string, skipped, failed bool) cloudevents.Event
- func (ef *Factory) TestSetStarted(featureSet, testName string) cloudevents.Event
- func (ef *Factory) TestStarted(feature, testName string) cloudevents.Event
- type LogEmitter
- func (l LogEmitter) Environment(env map[string]string)
- func (l LogEmitter) Exception(reason, messageFormat string, messageA ...interface{})
- func (l LogEmitter) Finished(result Result)
- func (l LogEmitter) NamespaceCreated(namespace string)
- func (l LogEmitter) NamespaceDeleted(namespace string)
- func (l LogEmitter) StepFinished(feature string, step *feature.Step, t feature.T)
- func (l LogEmitter) StepStarted(feature string, step *feature.Step, t feature.T)
- func (l LogEmitter) StepsPlanned(feature string, steps map[feature.Timing][]feature.Step, t feature.T)
- func (l LogEmitter) TestFinished(feature string, t feature.T)
- func (l LogEmitter) TestSetFinished(featureSet string, t feature.T)
- func (l LogEmitter) TestSetStarted(featureSet string, t feature.T)
- func (l LogEmitter) TestStarted(feature string, t feature.T)
- type NilSafeClient
- func (n *NilSafeClient) Environment(env map[string]string)
- func (n *NilSafeClient) Event(ctx context.Context, event cloudevents.Event)
- func (n *NilSafeClient) Exception(reason, messageFormat string, messageA ...interface{})
- func (n *NilSafeClient) Finished(_ Result)
- func (n *NilSafeClient) NamespaceCreated(namespace string)
- func (n *NilSafeClient) NamespaceDeleted(namespace string)
- func (n *NilSafeClient) StepFinished(feature string, step *feature.Step, t feature.T)
- func (n *NilSafeClient) StepStarted(feature string, step *feature.Step, t feature.T)
- func (n *NilSafeClient) StepsPlanned(feature string, steps map[feature.Timing][]feature.Step, t feature.T)
- func (n *NilSafeClient) TestFinished(feature string, t feature.T)
- func (n *NilSafeClient) TestSetFinished(featureSet string, t feature.T)
- func (n *NilSafeClient) TestSetStarted(featureSet string, t feature.T)
- func (n *NilSafeClient) TestStarted(feature string, t feature.T)
- type Result
Constants ¶
View Source
const ( EnvironmentType = "dev.knative.rekt.environment.v1" NamespaceCreatedType = "dev.knative.rekt.namespace.created.v1" NamespaceDeletedType = "dev.knative.rekt.namespace.deleted.v1" TestStartedType = "dev.knative.rekt.test.started.v1" TestFinishedType = "dev.knative.rekt.test.finished.v1" StepsPlannedType = "dev.knative.rekt.steps.planned.v1" StepStartedType = "dev.knative.rekt.step.started.v1" StepFinishedType = "dev.knative.rekt.step.finished.v1" TestSetStartedType = "dev.knative.rekt.testset.started.v1" TestSetFinishedType = "dev.knative.rekt.testset.finished.v1" FinishedType = "dev.knative.rekt.finished.v1" ExceptionType = "dev.knative.rekt.exception.v1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Emitter ¶
type Emitter interface { Environment(env map[string]string) NamespaceCreated(namespace string) NamespaceDeleted(namespace string) TestStarted(feature string, t feature.T) TestFinished(feature string, t feature.T) StepsPlanned(feature string, steps map[feature.Timing][]feature.Step, t feature.T) StepStarted(feature string, step *feature.Step, t feature.T) StepFinished(feature string, step *feature.Step, t feature.T) TestSetStarted(featureSet string, t feature.T) TestSetFinished(featureSet string, t feature.T) Finished(result Result) Exception(reason, messageFormat string, messageA ...interface{}) }
Emitter sends milestone events.
func NewMilestoneEmitter ¶
NewMilestoneEmitter will convert target uri to a milestone event sender and return it.
func NewMilestoneEmitterFromEnv ¶
NewMilestoneEmitterFromEnv will attempt to pull the env var `MILESTONE_EVENTS_TARGET` as the target uri for sending milestone events.
type Factory ¶
func NewFactory ¶
func (*Factory) Environment ¶
func (ef *Factory) Environment(env map[string]string) cloudevents.Event
func (*Factory) Exception ¶
func (ef *Factory) Exception(reason, messageFormat string, messageA ...interface{}) cloudevents.Event
func (*Factory) Finished ¶
func (ef *Factory) Finished() cloudevents.Event
func (*Factory) NamespaceCreated ¶
func (ef *Factory) NamespaceCreated(namespace string) cloudevents.Event
func (*Factory) NamespaceDeleted ¶
func (ef *Factory) NamespaceDeleted(namespace string) cloudevents.Event
func (*Factory) StepFinished ¶
func (ef *Factory) StepFinished(feature, stepName, timing, level, testName string, skipped, failed bool) cloudevents.Event
func (*Factory) StepStarted ¶
func (ef *Factory) StepStarted(feature, stepName, timing, level, testName string) cloudevents.Event
func (*Factory) StepsPlanned ¶
func (*Factory) TestFinished ¶
func (ef *Factory) TestFinished(feature, testName string, skipped, failed bool) cloudevents.Event
func (*Factory) TestSetFinished ¶
func (ef *Factory) TestSetFinished(featureSet, testName string, skipped, failed bool) cloudevents.Event
func (*Factory) TestSetStarted ¶
func (ef *Factory) TestSetStarted(featureSet, testName string) cloudevents.Event
func (*Factory) TestStarted ¶
func (ef *Factory) TestStarted(feature, testName string) cloudevents.Event
type LogEmitter ¶
type LogEmitter struct { AlwaysDumpEvents bool // contains filtered or unexported fields }
LogEmitter is an Emitter that logs milestone events.
func NewLogEmitter ¶
func NewLogEmitter(ctx context.Context, namespace string) *LogEmitter
NewLogEmitter creates an Emitter that logs milestone events.
func (LogEmitter) Environment ¶
func (l LogEmitter) Environment(env map[string]string)
func (LogEmitter) Exception ¶
func (l LogEmitter) Exception(reason, messageFormat string, messageA ...interface{})
func (LogEmitter) Finished ¶
func (l LogEmitter) Finished(result Result)
func (LogEmitter) NamespaceCreated ¶
func (l LogEmitter) NamespaceCreated(namespace string)
func (LogEmitter) NamespaceDeleted ¶
func (l LogEmitter) NamespaceDeleted(namespace string)
func (LogEmitter) StepFinished ¶
func (LogEmitter) StepStarted ¶
func (LogEmitter) StepsPlanned ¶
func (LogEmitter) TestFinished ¶
func (l LogEmitter) TestFinished(feature string, t feature.T)
func (LogEmitter) TestSetFinished ¶
func (l LogEmitter) TestSetFinished(featureSet string, t feature.T)
func (LogEmitter) TestSetStarted ¶
func (l LogEmitter) TestSetStarted(featureSet string, t feature.T)
func (LogEmitter) TestStarted ¶
func (l LogEmitter) TestStarted(feature string, t feature.T)
type NilSafeClient ¶
type NilSafeClient struct { Client cloudevents.Client Factory *Factory }
NilSafeClient is a simple wrapper around a cloudevent client that implements Emitter to provide nil check safety.
func (*NilSafeClient) Environment ¶
func (n *NilSafeClient) Environment(env map[string]string)
func (*NilSafeClient) Event ¶
func (n *NilSafeClient) Event(ctx context.Context, event cloudevents.Event)
Event implements Emitter.Event.
func (*NilSafeClient) Exception ¶
func (n *NilSafeClient) Exception(reason, messageFormat string, messageA ...interface{})
func (*NilSafeClient) Finished ¶
func (n *NilSafeClient) Finished(_ Result)
func (*NilSafeClient) NamespaceCreated ¶
func (n *NilSafeClient) NamespaceCreated(namespace string)
func (*NilSafeClient) NamespaceDeleted ¶
func (n *NilSafeClient) NamespaceDeleted(namespace string)
func (*NilSafeClient) StepFinished ¶
func (*NilSafeClient) StepStarted ¶
func (*NilSafeClient) StepsPlanned ¶
func (*NilSafeClient) TestFinished ¶
func (n *NilSafeClient) TestFinished(feature string, t feature.T)
func (*NilSafeClient) TestSetFinished ¶
func (n *NilSafeClient) TestSetFinished(featureSet string, t feature.T)
func (*NilSafeClient) TestSetStarted ¶
func (n *NilSafeClient) TestSetStarted(featureSet string, t feature.T)
func (*NilSafeClient) TestStarted ¶
func (n *NilSafeClient) TestStarted(feature string, t feature.T)
Click to show internal directories.
Click to hide internal directories.