Documentation
¶
Index ¶
- func NewEventFromMessage[T any](m *message.Message) (T, error)
- type EndpointCheckFailed
- type EndpointCheckSucceededEvent
- type Event
- type Header
- type IncidentCreatedEvent
- type IncidentResolvedEvent
- type MonitorCreatedEvent
- type Publisher
- func (p Publisher) PublishEndpointCheckFailed(ctx context.Context, event command.EndpointCheckFailedEvent) error
- func (p Publisher) PublishEndpointCheckSucceeded(ctx context.Context, event command.EndpointCheckSucceededEvent) error
- func (p Publisher) PublishIncidentCreated(ctx context.Context, event command.IncidentCreatedEvent) error
- func (p Publisher) PublishIncidentResolved(ctx context.Context, event command.IncidentResolvedEvent) error
- func (p Publisher) PublishMonitorCreated(ctx context.Context, event command.MonitorCreatedEvent) error
- type PublisherMock
- func (p *PublisherMock) Events() []Event
- func (p *PublisherMock) GetEventByID(id string) Event
- func (p *PublisherMock) PublishEndpointCheckFailed(ctx context.Context, event command.EndpointCheckFailedEvent) error
- func (p *PublisherMock) PublishEndpointCheckSucceeded(ctx context.Context, event command.EndpointCheckSucceededEvent) error
- func (p *PublisherMock) PublishIncidentCreated(ctx context.Context, event command.IncidentCreatedEvent) error
- func (p *PublisherMock) PublishIncidentResolved(ctx context.Context, event command.IncidentResolvedEvent) error
- func (p *PublisherMock) PublishMonitorCreated(ctx context.Context, event command.MonitorCreatedEvent) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EndpointCheckFailed ¶
type EndpointCheckFailed struct {
Header Header `json:"header"`
MonitorID string `json:"monitor_id"`
CheckResultID string `json:"check_result_id"`
CheckedURL string `json:"checked_url"`
At time.Time `json:"at"`
}
func (EndpointCheckFailed) EventName ¶
func (e EndpointCheckFailed) EventName() string
type EndpointCheckSucceededEvent ¶
type EndpointCheckSucceededEvent struct {
Header Header `json:"header"`
MonitorID string `json:"monitor_id"`
At time.Time `json:"at"`
}
func (EndpointCheckSucceededEvent) EventName ¶
func (e EndpointCheckSucceededEvent) EventName() string
type IncidentCreatedEvent ¶
type IncidentCreatedEvent struct {
Header Header `json:"header"`
IncidentID string `json:"incident_id"`
MonitorID string `json:"monitor_id"`
At time.Time `json:"at"`
}
func (IncidentCreatedEvent) EventName ¶
func (e IncidentCreatedEvent) EventName() string
type IncidentResolvedEvent ¶
type IncidentResolvedEvent struct {
Header Header `json:"header"`
MonitorID string `json:"monitor_id"`
IncidentID string `json:"incident_id"`
At time.Time `json:"at"`
}
func (IncidentResolvedEvent) EventName ¶
func (e IncidentResolvedEvent) EventName() string
type MonitorCreatedEvent ¶
type MonitorCreatedEvent struct {
Header Header `json:"header"`
ID string `json:"id"`
CreatedAt time.Time `json:"created_at"`
}
func NewMonitorCreatedEventFromMessage ¶
func NewMonitorCreatedEventFromMessage(m *message.Message) (MonitorCreatedEvent, error)
func (MonitorCreatedEvent) EventName ¶
func (e MonitorCreatedEvent) EventName() string
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
func (Publisher) PublishEndpointCheckFailed ¶
func (Publisher) PublishEndpointCheckSucceeded ¶
func (Publisher) PublishIncidentCreated ¶
func (Publisher) PublishIncidentResolved ¶
func (Publisher) PublishMonitorCreated ¶
type PublisherMock ¶
type PublisherMock struct {
// contains filtered or unexported fields
}
func NewPublisherMock ¶
func NewPublisherMock() *PublisherMock
func (*PublisherMock) Events ¶
func (p *PublisherMock) Events() []Event
func (*PublisherMock) GetEventByID ¶
func (p *PublisherMock) GetEventByID(id string) Event
func (*PublisherMock) PublishEndpointCheckFailed ¶
func (p *PublisherMock) PublishEndpointCheckFailed(ctx context.Context, event command.EndpointCheckFailedEvent) error
func (*PublisherMock) PublishEndpointCheckSucceeded ¶
func (p *PublisherMock) PublishEndpointCheckSucceeded(ctx context.Context, event command.EndpointCheckSucceededEvent) error
func (*PublisherMock) PublishIncidentCreated ¶
func (p *PublisherMock) PublishIncidentCreated(ctx context.Context, event command.IncidentCreatedEvent) error
func (*PublisherMock) PublishIncidentResolved ¶
func (p *PublisherMock) PublishIncidentResolved(ctx context.Context, event command.IncidentResolvedEvent) error
func (*PublisherMock) PublishMonitorCreated ¶
func (p *PublisherMock) PublishMonitorCreated(ctx context.Context, event command.MonitorCreatedEvent) error
Click to show internal directories.
Click to hide internal directories.