rawpresentation

package
v0.0.0-...-678bb0e Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLogDogToBuild

func AddLogDogToBuild(
	c context.Context, ub URLBuilder, mainAnno *miloProto.Step, build *resp.MiloBuild)

AddLogDogToBuild takes a set of logdog streams and populate a milo build. build.Summary.Finished must be set.

func NewClient

func NewClient(c context.Context, host string) (*coordinator.Client, error)

NewClient generates a new LogDog client that issues requests on behalf of the current user.

Types

type AnnotationStream

type AnnotationStream struct {
	Project cfgtypes.ProjectName
	Path    types.StreamPath

	// Client is the HTTP client to use for LogDog communication.
	Client *coordinator.Client
	// contains filtered or unexported fields
}

AnnotationStream represents a LogDog annotation protobuf stream.

func (*AnnotationStream) Fetch

Fetch loads the annotation stream from LogDog.

If the stream does not exist, or is invalid, Fetch will return a Milo error. Otherwise, it will return the Step that was loaded.

Fetch caches the step, so multiple calls to Fetch will return the same Step value.

func (*AnnotationStream) Normalize

func (as *AnnotationStream) Normalize() error

Normalize validates and normalizes the stream's parameters.

type BuildID

type BuildID struct {
	Host    string
	Project cfgtypes.ProjectName
	Path    types.StreamPath
}

BuildID implements buildsource.ID.

func NewBuildID

func NewBuildID(host, project, path string) *BuildID

NewBuildID generates a new un-validated BuildID.

func (*BuildID) Get

func (b *BuildID) Get(c context.Context) (*resp.MiloBuild, error)

Get implements buildsource.ID.

func (*BuildID) GetLog

func (b *BuildID) GetLog(context.Context, string) (string, bool, error)

GetLog implements buildsource.ID.

type Stream

type Stream struct {
	// Server is the LogDog server this stream originated from.
	Server string
	// Prefix is the LogDog prefix for the Stream.
	Prefix string
	// Path is the final part of the LogDog path of the Stream.
	Path string
	// IsDatagram is true if this is a MiloProto. False implies that this is a text log.
	IsDatagram bool
	// Data is the miloProto.Step of the Stream, if IsDatagram is true.  Otherwise
	// this is nil.
	Data *miloProto.Step
	// Text is the text of the Stream, if IsDatagram is false.  Otherwise
	// this is an empty string.
	Text string

	// Closed specifies whether Text or Data may change in the future.
	// If Closed, they may not.
	Closed bool
}

Stream represents a single LogDog style stream, which can contain either annotations (assumed to be MiloProtos) or text. Other types of annotations are not supported.

type Streams

type Streams struct {
	// MainStream is a pointer to the primary stream for this group of streams.
	MainStream *Stream
	// Streams is the full map streamName->stream referenced by MainStream.
	// It includes MainStream.
	Streams map[string]*Stream
}

Streams represents a group of LogDog Streams with a single entry point. Generally all of the streams are referenced by the entry point.

type URLBuilder

type URLBuilder interface {
	// LinkURL returns the URL associated with the supplied Link.
	//
	// If no URL could be built for that Link, nil will be returned.
	BuildLink(l *miloProto.Link) *resp.Link
}

URLBuilder constructs URLs for various link types.

type ViewerURLBuilder

type ViewerURLBuilder struct {
	Host    string
	Prefix  types.StreamName
	Project cfgtypes.ProjectName
}

ViewerURLBuilder is a URL builder that constructs LogDog viewer URLs.

func (b *ViewerURLBuilder) BuildLink(l *miloProto.Link) *resp.Link

BuildLink implements URLBuilder.

Directories

Path Synopsis
Package internal is a generated protocol buffer package.
Package internal is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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