stream

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stream

func Stream(
	ctx context.Context,
	logger *zap.Logger,
	ws *workspace.Workspace,
	vw *view.View,
	done chan bool,
	viewEventsReader events.EventReader,
	allowerProvider getAllowerer,
	workspaceService service_workspace.Service,
	suggestionsServcie *service_suggestions.Service,
) (chan Event, error)

Stream

The expectedWorkspaceID makes sure that the view is using the expected workspace

Types

type Event

type Event struct {
	Name    EventName
	Message interface{}
}

type EventName

type EventName string
const (
	Ping            EventName = "Ping"
	Diffs           EventName = "Diffs"
	CodebaseUpdated EventName = "CodebaseUpdated"
	ConflictDiffs   EventName = "ConflictDiffs"
)

type ViewDiffEvent

type ViewDiffEvent struct {
	Diffs []unidiff.FileDiff `json:"diffs"`
}

Jump to

Keyboard shortcuts

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