Documentation ¶
Index ¶
- func ConsoleRouter(logger zerolog.Logger) chi.Router
- func EventRouter(eventsClient EventsClient, logger zerolog.Logger) chi.Router
- func Healthcheck(natsClient NatsClient, endpoint string) func(http.Handler) http.Handler
- func Serve(addr string, hopsContent *hcl.BodyContent, natsClient NatsClient, ...) error
- func TaskRouter(taskHops taskReader, natsClient NatsClient, logger zerolog.Logger) chi.Router
- type Event
- type EventItem
- type EventLog
- type EventsClient
- type NatsClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsoleRouter ¶
The console router serves the single page app for the console. It will serve the index.html file for any path that does not exist, allowing client-side to handle routing
func EventRouter ¶ added in v0.7.0
func EventRouter(eventsClient EventsClient, logger zerolog.Logger) chi.Router
func Healthcheck ¶
func Serve ¶
func Serve(addr string, hopsContent *hcl.BodyContent, natsClient NatsClient, logger zerolog.Logger) error
func TaskRouter ¶
func TaskRouter(taskHops taskReader, natsClient NatsClient, logger zerolog.Logger) chi.Router
Types ¶
type EventItem ¶ added in v0.7.0
type EventItem struct { Event Event `json:"event"` SequenceId string `json:"sequence_id"` Timestamp time.Time `json:"timestamp"` AppName string `json:"app_name"` Channel string `json:"channel"` Done bool `json:"done"` HandlerName string `json:"handler_name"` MessageId string `json:"message_id"` }
EventItem includes metadata for /events api endpoint
type EventLog ¶ added in v0.7.0
type EventLog struct { StartTimestamp time.Time `json:"start_timestamp"` EndTimestamp time.Time `json:"end_timestamp"` EventItems []EventItem `json:"event_items"` }
EventLog is a list of events with search start and search end timestamps
type EventsClient ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.