saf

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CondBegin     = "begin"
	CondOngoing   = "ongoing"
	CondSucceeded = "succeeded"
	CondLimited   = "limited"
	CondFailed    = "failed"
)

Variables

View Source
var (
	ErrStreamTruncated = errors.New("saf stream truncated")
	ErrStreamLimited   = fmt.Errorf("saf stream %s", CondLimited)
)

Functions

func Error

func Error(cond, msg string) error

Types

type Message

type Message struct {
	Cond string          `json:"cond,omitempty"`
	Msg  string          `json:"msg,omitempty"`
	Obj  json.RawMessage `json:"obj,omitempty"`
}

type Stream

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

func (*Stream) Ch

func (s *Stream) Ch() <-chan json.RawMessage

func (*Stream) Close

func (s *Stream) Close() error

func (*Stream) Err

func (s *Stream) Err() error

func (*Stream) Run

func (s *Stream) Run(ctx context.Context, r io.ReadCloser)

Jump to

Keyboard shortcuts

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