streamer

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2018 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestStreamArray

func NewTestStreamArray() *testStreamArray

func StreamFromArray

func StreamFromArray(array StreamArray, stream Streamable, log Loggy) (err error)

StreamFromArray will do exactly that, it will write to the Streamable stream from an array. it will wait 0.1s before checking array again for new content

func StreamFromStorage

func StreamFromStorage(store storage.BuildOut, stream Streamable, storageKey int64) error

Types

type BuildStreamableServer

type BuildStreamableServer struct {
	pb.Build_BuildInfoServer
}

func (*BuildStreamableServer) Finish

func (x *BuildStreamableServer) Finish(done chan int)

func (*BuildStreamableServer) SendError

func (x *BuildStreamableServer) SendError(errorDesc []byte)

func (*BuildStreamableServer) SendIt

func (x *BuildStreamableServer) SendIt(data []byte) error

type Loggy

type Loggy interface {
	Debug(args ...interface{})
	Error(args ...interface{})
	Info(args ...interface{})
}

type StreamArray

type StreamArray interface {
	GetData() [][]byte
	CheckDone() bool
	Append(line []byte)
	sync.Locker
}

type StreamCancelled

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

func NewStreamCancelled

func NewStreamCancelled(msg string) *StreamCancelled

func (*StreamCancelled) Error

func (sc *StreamCancelled) Error() string

type StreamPack

type StreamPack struct {
	Consul    *consul.Consulet
	Store     storage.OcelotStorage
	BuildInfo map[string]*buildDatum
}

StreamPack holds all the connections that the grpc streamer needs to check if a build is active, and eventually

save the log data to the store

func GetStreamPack

func GetStreamPack(store storage.OcelotStorage, consulet *consul.Consulet) *StreamPack

func (*StreamPack) ListenTransport

func (sp *StreamPack) ListenTransport(transpo chan *models.Transport)

func (*StreamPack) PumpBundle

func (sp *StreamPack) PumpBundle(stream Streamable, hash string, done chan int)

pumpBundle writes build data to web socket

type Streamable

type Streamable interface {
	SendIt(data []byte) error
	SendError(errorDesc []byte)
	Finish(chan int)
}

Jump to

Keyboard shortcuts

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