task

package
v0.0.0-...-73df0bb Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
	Relation() Relation
	ShortDescription() string
}

type AgentRelation

type AgentRelation struct {
	AgentTaskID string
	ReplyTo     string
}

func (AgentRelation) Matches

func (id1 AgentRelation) Matches(id Relation) bool

type AgentRequest

type AgentRequest struct {
	AgentID   string
	Protocol  int
	Method    string
	Arguments []interface{}
	ReplyTo   string `json:"reply_to"`
	// contains filtered or unexported fields
}

func NewAgentRequest

func NewAgentRequest(str string) *AgentRequest

func (*AgentRequest) Relation

func (r *AgentRequest) Relation() Relation

func (AgentRequest) ShortDescription

func (r AgentRequest) ShortDescription() string

type AgentResponse

type AgentResponse struct {
	Value     interface{}
	Exception interface{}
	ReplyTo   string
	// contains filtered or unexported fields
}

func NewAgentResponse

func NewAgentResponse(str string) *AgentResponse

func (AgentResponse) Relation

func (r AgentResponse) Relation() Relation

func (AgentResponse) ShortDescription

func (r AgentResponse) ShortDescription() string

type CPIRequest

type CPIRequest struct {
	Method    string
	Arguments []interface{}

	RequestID string
}

func NewCPIRequest

func NewCPIRequest(str string) *CPIRequest

func (CPIRequest) Relation

func (r CPIRequest) Relation() Relation

func (CPIRequest) ShortDescription

func (r CPIRequest) ShortDescription() string

type CPIResponse

type CPIResponse struct {
	Result string
	Error  interface{}
	Log    string

	RequestID string
}

func NewCPIResponse

func NewCPIResponse(str string) *CPIResponse

func (CPIResponse) Relation

func (r CPIResponse) Relation() Relation

func (CPIResponse) ShortDescription

func (r CPIResponse) ShortDescription() string

type DBStatement

type DBStatement struct {
	Type string
	Time float64 // todo duration
	// contains filtered or unexported fields
}

func NewDBStatement

func NewDBStatement(str string, lineNum int) *DBStatement

func (DBStatement) Relation

func (r DBStatement) Relation() Relation

func (DBStatement) ShortDescription

func (r DBStatement) ShortDescription() string

type Details

type Details struct {
	DirectorVersion string
	TaskID          string

	Lines        []*Line
	UnknownLines []UnknownLine
}

func (Details) FindGroup

func (d Details) FindGroup(name string) (Group, error)

func (Details) Group

func (d Details) Group() Group

func (Details) Groups

func (d Details) Groups() []Group

type ExactRelation

type ExactRelation struct {
	Value string
}

func (ExactRelation) Matches

func (id1 ExactRelation) Matches(id Relation) bool

type Group

type Group struct {
	Name  string
	Lines []*Line
}

func (Group) Actions

func (g Group) Actions() []SpanningAction

func (Group) Duration

func (g Group) Duration() time.Duration

func (Group) EndedAt

func (g Group) EndedAt() time.Time

func (Group) StartedAt

func (g Group) StartedAt() time.Time

type Line

type Line struct {
	Number  int
	Level   string
	Time    time.Time
	Group   string
	Content string
	// contains filtered or unexported fields
}

func (*Line) Action

func (l *Line) Action() Action

func (Line) IsError

func (l Line) IsError() bool

func (Line) TruncatedContent

func (l Line) TruncatedContent(max int) string

type LineTimeSorting

type LineTimeSorting []*Line

func (LineTimeSorting) Len

func (ls LineTimeSorting) Len() int

func (LineTimeSorting) Less

func (ls LineTimeSorting) Less(i, j int) bool

func (LineTimeSorting) Swap

func (ls LineTimeSorting) Swap(i, j int)

type NonMatchingRelation

type NonMatchingRelation struct{}

func (NonMatchingRelation) Matches

func (id1 NonMatchingRelation) Matches(id Relation) bool

type Relation

type Relation interface {
	Matches(Relation) bool
}

type SpanningAction

type SpanningAction struct {
	// contains filtered or unexported fields
}

func (*SpanningAction) AddLines

func (a *SpanningAction) AddLines(lines []*Line)

func (SpanningAction) Duration

func (a SpanningAction) Duration() time.Duration

func (SpanningAction) EndedAt

func (a SpanningAction) EndedAt() time.Time

func (SpanningAction) Group

func (a SpanningAction) Group() string

func (*SpanningAction) IsRelated

func (a *SpanningAction) IsRelated(b *SpanningAction) bool

func (*SpanningAction) Merge

func (a *SpanningAction) Merge(b *SpanningAction)

func (SpanningAction) ShortDescription

func (a SpanningAction) ShortDescription() string

func (*SpanningAction) SortLinesChrono

func (a *SpanningAction) SortLinesChrono()

func (SpanningAction) StartedAt

func (a SpanningAction) StartedAt() time.Time

type Task

type Task struct {
	// contains filtered or unexported fields
}

func NewTask

func NewTask(bytes []byte) *Task

func (*Task) Details

func (t *Task) Details() (Details, error)

type UnknownAction

type UnknownAction struct {
	// contains filtered or unexported fields
}

func (UnknownAction) Relation

func (a UnknownAction) Relation() Relation

func (UnknownAction) ShortDescription

func (a UnknownAction) ShortDescription() string

type UnknownLine

type UnknownLine struct {
	Number  int
	Content string
}

Jump to

Keyboard shortcuts

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