{"modulePath":"github.com/Coding/drone","version":"v0.4.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package stream\n\n## Functions\n\n```go\nfunc Copy(dest io.Writer, src io.Reader) error\n```\nCopy copies the stream from the source to the destination in valid JSON format. This converts the logs, which are per-line JSON objects, to a proper JSON array.\n\n```go\nfunc Create(c context.Context, key string) error\n```\nCreate creates a new stream.\n\n```go\nfunc Delete(c context.Context, key string) error\n```\nDelete deletes the stream by key.\n\n```go\nfunc Reader(c context.Context, key string) (io.ReadCloser, error)\n```\nReader opens the stream for reading.\n\n```go\nfunc ToContext(c Setter, s Stream)\n```\nToContext adds the Stream to this context if it supports the Setter interface.\n\n```go\nfunc ToKey(i int64) string\n```\nToKey is a helper function that converts a unique identifier of type int64 into a string.\n\n```go\nfunc Writer(c context.Context, key string) (io.WriteCloser, error)\n```\nWriter opens the stream for writing.\n\n## Types\n\n```go\ntype Setter interface {\n\tSet(string, interface{})\n}\n```\nSetter defines a context that enables setting values.\n\n```go\ntype Stream interface {\n\tCreate(string) error\n\tDelete(string) error\n\tReader(string) (io.ReadCloser, error)\n\tWriter(string) (io.WriteCloser, error)\n}\n```\nStream manages the stream of build logs.\n\n```go\nfunc FromContext(c context.Context) Stream\n```\nFromContext returns the Stream associated with this context.\n\n```go\nfunc New() Stream\n```\nNew returns a new in-memory implementation of Stream.\n\n","path":"github.com/Coding/drone/stream","name":"stream","synopsis":"","isRedistributable":true}
