provider

package
v0.0.1-rc4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: ISC Imports: 9 Imported by: 4

Documentation

Index

Constants

View Source
const (
	OptionCASAlgorithm = "cas-algorithm"
)

Variables

View Source
var ErrUnsupported = errors.New("unsupported")

Functions

func OptionGet

func OptionGet(v any, opt string) any

OptionGet returns the value of the option as any.

func OptionSet

func OptionSet(v any, opt string, value any) error

OptionSet sets the value of the option.

func OptionType

func OptionType(v any, opt string) reflect.Type

OptionType returns the type of the option.

func Options

func Options(v any) []string

Options uses struct field tags to determine the options of a type.

func SetOptions

func SetOptions(val any, opts map[string]string) error

Types

type Provider

type Provider interface {
	Name() string
	SourceBuilder() SourceBuilder
	SinkBuilder() SinkBuilder
	CAS() (api.CAS, api.CloseWaitFunc, error)
	CASReader() (api.CASReader, api.CloseWaitFunc, error)
	CASWriter() (api.CASWriter, api.CloseWaitFunc, error)
}

type SinkBuilder

type SinkBuilder interface {
	WithSinkRef(string) SinkBuilder
	Set(string, any) SinkBuilder
	Build() (api.Sink, api.CloseWaitFunc, error)
}

type SinkOptions

type SinkOptions interface {
	SinkRef() string
}

type SourceBuilder

type SourceBuilder interface {
	WithSourceRef(string) SourceBuilder
	Build() (api.Source, api.CloseWaitFunc, error)
}

type SourceOptions

type SourceOptions interface {
	SourceRef() string
}

type UnsupportedSinkBuilder

type UnsupportedSinkBuilder struct{}

func (UnsupportedSinkBuilder) Build

func (UnsupportedSinkBuilder) Set

func (UnsupportedSinkBuilder) WithSinkRef

func (b UnsupportedSinkBuilder) WithSinkRef(_ string) SinkBuilder

type UnsupportedSourceBuilder

type UnsupportedSourceBuilder struct{}

func (UnsupportedSourceBuilder) Build

func (UnsupportedSourceBuilder) Set

func (UnsupportedSourceBuilder) WithSourceRef

func (b UnsupportedSourceBuilder) WithSourceRef(_ string) SourceBuilder

Jump to

Keyboard shortcuts

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