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 Devenv ¶
type Devenv struct {
Bin string `json:"bin,omitempty"`
Version string `json:"version,omitempty"`
KindBin string `json:"kind_bin,omitempty"`
DevspaceBin string `json:"devspace_bin,omitempty"`
Type string `json:"type,omitempty"`
DevDeploymentProfile string `json:"dev_deployment_profile,omitempty"`
DeployVersion string `json:"deploy_version,omitempty"`
DeployImageSource string `json:"deploy_image_source,omitempty"`
DeployImageRegistry string `json:"deploy_image_registry,omitempty"`
DeployDevImageRegistry string `json:"deploy_dev_image_registry,omitempty"`
DeployBoxImageRegistry string `json:"deploy_box_image_registry,omitempty"`
DeployAppname string `json:"deploy_appname,omitempty"`
DeployUseDevspace bool `json:"deploy_use_devspace,omitempty"`
DevSkipPortforwarding bool `json:"dev_skip_portforwarding,omitempty"`
DevTerminal bool `json:"dev_terminal,omitempty"`
}
Devenv contains the details about devenv environment variables provided with 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"`
Devenv *Devenv `json:"devenv,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.