Documentation ¶
Index ¶
- func NewConsoleEventID(context, namespace, console string, time time.Time) string
- type CommonEvent
- type ConsoleAttachEvent
- type ConsoleAttachSpec
- type ConsoleAuthoriseEvent
- type ConsoleAuthoriseSpec
- type ConsoleRequestEvent
- type ConsoleRequestSpec
- type ConsoleStartEvent
- type ConsoleStartSpec
- type ConsoleTerminatedEvent
- type ConsoleTerminatedSpec
- type ErrorPubsubFailedConnect
- type ErrorPubsubFailedPublish
- type EventKind
- type GooglePubSubPublisher
- type Kind
- type NopPublisher
- type Publisher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommonEvent ¶
type CommonEvent struct { Version string `json:"apiVersion"` Kind Kind `json:"kind"` Event EventKind `json:"event"` ObservedAt time.Time `json:"observed_at"` Id string `json:"id"` Annotations map[string]string `json:"annotations"` }
func (CommonEvent) EventKind ¶
func (e CommonEvent) EventKind() string
EventKind returns the Kind/Event of the Event
type ConsoleAttachEvent ¶
type ConsoleAttachEvent struct { CommonEvent `json:",inline"` Spec ConsoleAttachSpec `json:"spec"` }
type ConsoleAttachSpec ¶
type ConsoleAuthoriseEvent ¶
type ConsoleAuthoriseEvent struct { CommonEvent `json:",inline"` Spec ConsoleAuthoriseSpec `json:"spec"` }
type ConsoleAuthoriseSpec ¶
type ConsoleAuthoriseSpec struct {
Username string `json:"username"`
}
type ConsoleRequestEvent ¶
type ConsoleRequestEvent struct { CommonEvent `json:",inline"` Spec ConsoleRequestSpec `json:"spec"` }
type ConsoleRequestSpec ¶
type ConsoleRequestSpec struct { Reason string `json:"reason"` Username string `json:"username"` // Context is used to denote the cluster name, Context string `json:"context"` Namespace string `json:"namespace"` ConsoleTemplate string `json:"console_template"` Console string `json:"console"` RequiredAuthorisations int `json:"required_authorisations"` AuthorisationRuleName string `json:"authorisation_rule_name"` Timestamp time.Time `json:"timestamp"` Labels map[string]string `json:"labels"` }
type ConsoleStartEvent ¶
type ConsoleStartEvent struct { CommonEvent `json:",inline"` Spec ConsoleStartSpec `json:"spec"` }
type ConsoleStartSpec ¶
type ConsoleStartSpec struct {
Job string `json:"job"`
}
type ConsoleTerminatedEvent ¶
type ConsoleTerminatedEvent struct { CommonEvent `json:",inline"` Spec ConsoleTerminatedSpec `json:"spec"` }
type ConsoleTerminatedSpec ¶
type ErrorPubsubFailedConnect ¶
type ErrorPubsubFailedConnect struct {
// contains filtered or unexported fields
}
func (ErrorPubsubFailedConnect) Error ¶
func (e ErrorPubsubFailedConnect) Error() string
func (ErrorPubsubFailedConnect) Unwrap ¶
func (e ErrorPubsubFailedConnect) Unwrap() error
type ErrorPubsubFailedPublish ¶
type ErrorPubsubFailedPublish struct { Topic string Message interface{} // contains filtered or unexported fields }
ErrorPubsubFailedPublish provides context on the reasons that we failed to publish our message
func (ErrorPubsubFailedPublish) Error ¶
func (e ErrorPubsubFailedPublish) Error() string
func (ErrorPubsubFailedPublish) Unwrap ¶
func (e ErrorPubsubFailedPublish) Unwrap() error
type GooglePubSubPublisher ¶
type GooglePubSubPublisher struct {
// contains filtered or unexported fields
}
GooglePubSubPublisher implements the publisher.Publisher interface, allowing us to publish messages to a Google Pub/Sub topic
func (*GooglePubSubPublisher) Publish ¶
func (p *GooglePubSubPublisher) Publish(ctx context.Context, msg interface{}) (string, error)
func (*GooglePubSubPublisher) Stop ¶
func (p *GooglePubSubPublisher) Stop()
type NopPublisher ¶
type NopPublisher struct{}
https://en.wikipedia.org/wiki/NOP_(code)
func NewNopPublisher ¶
func NewNopPublisher() *NopPublisher
Click to show internal directories.
Click to hide internal directories.