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"` 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 ¶ added in v3.4.0
type ErrorPubsubFailedConnect struct {
// contains filtered or unexported fields
}
func (ErrorPubsubFailedConnect) Error ¶ added in v3.4.0
func (e ErrorPubsubFailedConnect) Error() string
func (ErrorPubsubFailedConnect) Unwrap ¶ added in v3.4.0
func (e ErrorPubsubFailedConnect) Unwrap() error
type ErrorPubsubFailedPublish ¶ added in v3.4.0
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 ¶ added in v3.4.0
func (e ErrorPubsubFailedPublish) Error() string
func (ErrorPubsubFailedPublish) Unwrap ¶ added in v3.4.0
func (e ErrorPubsubFailedPublish) Unwrap() error
type GooglePubSubPublisher ¶ added in v3.4.0
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 NewGooglePubSubPublisher ¶ added in v3.4.0
func (*GooglePubSubPublisher) Publish ¶ added in v3.4.0
func (p *GooglePubSubPublisher) Publish(ctx context.Context, msg interface{}) (string, error)
func (*GooglePubSubPublisher) Stop ¶ added in v3.4.0
func (p *GooglePubSubPublisher) Stop()
type NopPublisher ¶ added in v3.4.0
type NopPublisher struct{}
https://en.wikipedia.org/wiki/NOP_(code)
func NewNopPublisher ¶ added in v3.4.0
func NewNopPublisher() *NopPublisher
Click to show internal directories.
Click to hide internal directories.