Documentation
¶
Overview ¶
Package devspace contains the logic for matching devspace hooks across CLI runs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
Name string `json:"name"`
Line string `json:"line"`
Flags []string `json:"flags,omitempty"`
Args []string `json:"args,omitempty"`
}
Command contains the details about devspace command that triggered the event.
type Event ¶
type Event struct {
Name string `json:"event,omitempty"`
Hook string `json:"hook,omitempty"`
ExecutionID string `json:"execution_id,omitempty"`
Error string `json:"error,omitempty"`
Status string `json:"status,omitempty"`
Command *Command `json:"command,omitempty"`
Timestamp int64 `json:"timestamp"`
TimestampTag time.Time `json:"@timestamp,omitempty"`
Duration int64 `json:"duration_ms,omitempty"`
}
Event contains the details about the devspace hook event.
func EventFromEnv ¶
func EventFromEnv() *Event
EventFromEnv scrapes the event data from the environment variables.
func (*Event) MarshalRecord ¶
MarshalRecord adds the event data to the target data structure (map most likely).
func (*Event) UnmarshalRecord ¶
UnmarshalRecord unmarshals the event data from the map into Event.
type EventTracker ¶
type EventTracker struct {
// contains filtered or unexported fields
}
EventTracker is responsible for matching events, calculating durations and storing the data in a store. It also handles the processing of the events on Flush.
func NewTracker ¶
func NewTracker(p Processor, s store.Store) *EventTracker
NewTracker creates a new DevspaceTracker.