crashData

package
v0.9.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2019 License: Apache-2.0 Imports: 10 Imported by: 21

Documentation

Index

Constants

View Source
const UnknownName = "unknown"

Variables

View Source
var (
	LoadEventsUntilTime *time.Time
)

Functions

func CleanupExitDescription

func CleanupExitDescription(exitDescription string) string

func ExtractExitStatusFromExitDescription

func ExtractExitStatusFromExitDescription(exitDescription string) string

func FindCountSinceByApp

func FindCountSinceByApp(appGuid string, since time.Duration) int

func GetCacheTime

func GetCacheTime() *time.Time

func IsCacheLoaded

func IsCacheLoaded() bool

func LoadCrashDataCache

func LoadCrashDataCache(cliConnection plugin.CliConnection)

Types

type ContainerCrashInfo

type ContainerCrashInfo struct {
	ContainerIndex  int
	CrashTime       *time.Time
	ExitDescription string
}

func FindByApp

func FindByApp(appGuid string) []*ContainerCrashInfo

func FindLastCrashByApp

func FindLastCrashByApp(appGuid string) *ContainerCrashInfo

func FindSinceByApp

func FindSinceByApp(appGuid string, since time.Duration) []*ContainerCrashInfo

func NewContainerCrashInfo

func NewContainerCrashInfo(containerIndex int, crashTime *time.Time, exitDescription string) *ContainerCrashInfo

type ContainerCrashInfoSlice

type ContainerCrashInfoSlice []*ContainerCrashInfo

func (ContainerCrashInfoSlice) Len

func (p ContainerCrashInfoSlice) Len() int

func (ContainerCrashInfoSlice) Less

func (p ContainerCrashInfoSlice) Less(i, j int) bool

func (ContainerCrashInfoSlice) Swap

func (p ContainerCrashInfoSlice) Swap(i, j int)

type EventData

type EventData struct {
	common.EntityCommon
	Type              string                 `json:"type"`
	Actor             string                 `json:"actor"`
	Actor_type        string                 `json:"actor_type"`
	Actor_name        string                 `json:"actor_name"`
	Actor_username    string                 `json:"actor_username"`
	Actee             string                 `json:"actee"`
	Actee_type        string                 `json:"actee_type"`
	Actee_name        string                 `json:"actee_name"`
	Timestamp         string                 `json:"timestamp"`
	Space_guid        string                 `json:"space_guid"`
	Organization_guid string                 `json:"organization_guid"`
	Metadata          EventDataMetadataField `json:"metadata"`
}

func All

func All() []EventData

func Find

func Find(guid string) EventData

type EventDataMetadata

type EventDataMetadata struct {
	*common.Metadata
	*EventData
}

func NewEventDataMetadata

func NewEventDataMetadata(EventData EventData) *EventDataMetadata

func NewEventDataMetadataById

func NewEventDataMetadataById(id string) *EventDataMetadata

type EventDataMetadataField

type EventDataMetadataField struct {
	Instance         string `json:"instance"`
	Index            int    `json:"index"`
	Exit_description string `json:"exit_description"`
	Reason           string `json:"reason"`
}

type EventDataResource

type EventDataResource struct {
	Meta   common.Meta `json:"metadata"`
	Entity EventData   `json:"entity"`
}

type EventDataResponse

type EventDataResponse struct {
	Count     int                 `json:"total_results"`
	Pages     int                 `json:"total_pages"`
	NextUrl   string              `json:"next_url"`
	Resources []EventDataResource `json:"resources"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL