Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream is a stream that processes lists of Kubernetes objects. It assumes that the input contains the JSON representation of a list, locates the `items` field and then proceses the items in a streaming fashion, without first reading all the complete list of items in memory. Don't create instances of this type directly, use the NewStream function instead.
type StreamBuilder ¶
type StreamBuilder struct {
// contains filtered or unexported fields
}
StreamBuilder contains the data and logic needed to create an stream that processes list of Kubernetes objects. Don't create instances of this type directly, use the NewStream function instead.
func NewStream ¶
func NewStream() *StreamBuilder
NewStream creates a builder that can then be used to create and configure a stream that processes list of Kubernetes objects.
func (*StreamBuilder) Build ¶
func (b *StreamBuilder) Build() (result *Stream, err error)
func (*StreamBuilder) SetLogger ¶
func (b *StreamBuilder) SetLogger(value *slog.Logger) *StreamBuilder
SetLogger sets the logger that the stream will use to write to the log. This is mandatory.
func (*StreamBuilder) SetReader ¶
func (b *StreamBuilder) SetReader(value io.Reader) *StreamBuilder
SetReader sets the input source. This is mandatory.
Note that the stream will automatically close this reader when it reaches the end of the stream, so refrain from closing it as it may result in prematurely ending the stream.