Documentation ¶
Index ¶
- func MustCreateRegex(varName string) *regexp.Regexp
- type Input
- type Output
- type Plugin
- type TemplateLogPlugin
- type TemplateScheme
- func (i TemplateScheme) IsATemplateScheme() bool
- func (i TemplateScheme) MarshalJSON() ([]byte, error)
- func (i TemplateScheme) MarshalYAML() (interface{}, error)
- func (i TemplateScheme) String() string
- func (i *TemplateScheme) UnmarshalJSON(data []byte) error
- func (i *TemplateScheme) UnmarshalYAML(unmarshal func(interface{}) error) error
- type TemplateURI
- type TemplateVar
- type TemplateVars
- type TemplateVarsByScheme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustCreateRegex ¶
Types ¶
type Input ¶
type Input struct { HostName string PodName string Namespace string ContainerName string ContainerID string LogName string PodRFC3339StartTime string PodRFC3339FinishTime string PodUnixStartTime int64 PodUnixFinishTime int64 PodUID string TaskExecutionID pluginsCore.TaskExecutionID ExtraTemplateVarsByScheme *TemplateVarsByScheme }
Input contains all available information about task's execution that a log plugin can use to construct task's log links.
type Plugin ¶
type Plugin interface { // Generates a TaskLog object given necessary computation information GetTaskLogs(i Input) (logs Output, err error) }
Plugin represents an interface for task log plugins to implement to plug generated task log links into task events.
type TemplateLogPlugin ¶
type TemplateLogPlugin struct { DisplayName string `json:"displayName" pflag:",Display name for the generated log when displayed in the console."` TemplateURIs []TemplateURI `json:"templateUris" pflag:",URI Templates for generating task log links."` MessageFormat core.TaskLog_MessageFormat `json:"messageFormat" pflag:",Log Message Format."` Scheme TemplateScheme `json:"scheme" pflag:",Templating scheme to use. Supported values are Pod and TaskExecution."` }
func (TemplateLogPlugin) GetTaskLogs ¶
func (p TemplateLogPlugin) GetTaskLogs(input Input) (Output, error)
type TemplateScheme ¶
type TemplateScheme int
const ( TemplateSchemePod TemplateScheme = iota TemplateSchemeTaskExecution )
func TemplateSchemeString ¶
func TemplateSchemeString(s string) (TemplateScheme, error)
TemplateSchemeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func TemplateSchemeValues ¶
func TemplateSchemeValues() []TemplateScheme
TemplateSchemeValues returns all values of the enum
func (TemplateScheme) IsATemplateScheme ¶
func (i TemplateScheme) IsATemplateScheme() bool
IsATemplateScheme returns "true" if the value is listed in the enum definition. "false" otherwise
func (TemplateScheme) MarshalJSON ¶
func (i TemplateScheme) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for TemplateScheme
func (TemplateScheme) MarshalYAML ¶
func (i TemplateScheme) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler for TemplateScheme
func (TemplateScheme) String ¶
func (i TemplateScheme) String() string
func (*TemplateScheme) UnmarshalJSON ¶
func (i *TemplateScheme) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for TemplateScheme
func (*TemplateScheme) UnmarshalYAML ¶
func (i *TemplateScheme) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler for TemplateScheme
type TemplateURI ¶
type TemplateURI = string
TemplateURI is a URI that accepts templates. See: go/tasks/pluginmachinery/tasklog/template.go for available templates.
type TemplateVar ¶
type TemplateVars ¶
type TemplateVars []TemplateVar
type TemplateVarsByScheme ¶
type TemplateVarsByScheme struct { Common TemplateVars Pod TemplateVars TaskExecution TemplateVars }