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 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 TaskExecutionIdentifier *core.TaskExecutionIdentifier 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 {
// contains filtered or unexported fields
}
A simple log plugin that supports templates in urls to build the final log link. See `defaultRegexes` for supported templates.
func NewTemplateLogPlugin ¶
func NewTemplateLogPlugin(scheme TemplateScheme, templateUris []string, messageFormat core.TaskLog_MessageFormat) TemplateLogPlugin
NewTemplateLogPlugin creates a template-based log plugin with the provided template Uri and message format. See `defaultRegexes` for supported templates.
func (TemplateLogPlugin) GetTaskLog ¶
func (TemplateLogPlugin) GetTaskLogs ¶
func (s 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 TemplateVar ¶
type TemplateVars ¶
type TemplateVars []TemplateVar
type TemplateVarsByScheme ¶
type TemplateVarsByScheme struct { Common TemplateVars Pod TemplateVars TaskExecution TemplateVars }