reader

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bytes

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

Bytes is a provider that returns a fixed byte slice.

func NewBytes

func NewBytes(data []byte) *Bytes

NewBytes creates a Bytes provider that always returns the provided byte slice.

func (*Bytes) Read

func (b *Bytes) Read(ctx context.Context) ([]byte, error)

type Reader

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

Reader is a provider that reads all configuration bytes from an underlying io.Reader.

func NewReader

func NewReader(r io.Reader) *Reader

NewReader creates a new Reader that wraps the provided io.Reader.

func (*Reader) Read

func (r *Reader) Read(ctx context.Context) ([]byte, error)

Read implements provider.Provider by returning all bytes from the underlying io.Reader. The context is accepted for interface compatibility and is not used for cancellation here.

Jump to

Keyboard shortcuts

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