snapshotclient

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Get(ctx context.Context, u runtime.Unstructured, opts ...GetOption) error
	Delete(ctx context.Context, u runtime.Unstructured, opts ...DeleteOption) error
	List(ctx context.Context, u runtime.Unstructured, opts ...ListOption) error
	Diff(ctx context.Context, opts ...DiffOption) ([]byte, error)
	Result(ctx context.Context, opts ...ResultOption) (*runnerpb.Once_RunResponse, error)
	Watch(ctx context.Context, u runtime.Unstructured, opts ...ListOption) chan *snapshotpb.Watch_Response
	Close() error
}

func NewClient

func NewClient(config *config.Config) (Client, error)

type DeleteOption

type DeleteOption interface {
	// ApplyToGet applies this configuration to the given get options.
	ApplyToDelete(*DeleteOptions)
}

type DeleteOptions

type DeleteOptions struct {
	Proxy types.NamespacedName
}

func (*DeleteOptions) ApplyOptions

func (o *DeleteOptions) ApplyOptions(opts []DeleteOption) *DeleteOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*DeleteOptions) ApplyToDelete

func (o *DeleteOptions) ApplyToDelete(lo *DeleteOptions)

type DiffOption

type DiffOption interface {
	ApplyToDiff(*DiffOptions)
}

type DiffOptions

type DiffOptions struct {
	Proxy             types.NamespacedName
	ShowManagedFields bool
	ShowChoreoAPIs    bool
}

func (*DiffOptions) ApplyOptions

func (o *DiffOptions) ApplyOptions(opts []DiffOption) *DiffOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*DiffOptions) ApplyToDiff

func (o *DiffOptions) ApplyToDiff(lo *DiffOptions)

type GetOption

type GetOption interface {
	// ApplyToGet applies this configuration to the given get options.
	ApplyToGet(*GetOptions)
}

type GetOptions

type GetOptions struct {
	Proxy types.NamespacedName
}

func (*GetOptions) ApplyOptions

func (o *GetOptions) ApplyOptions(opts []GetOption) *GetOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*GetOptions) ApplyToGet

func (o *GetOptions) ApplyToGet(lo *GetOptions)

type ListOption

type ListOption interface {
	ApplyToList(*ListOptions)
}

type ListOptions

type ListOptions struct {
	Proxy types.NamespacedName
	Watch bool
}

func (*ListOptions) ApplyOptions

func (o *ListOptions) ApplyOptions(opts []ListOption) *ListOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*ListOptions) ApplyToList

func (o *ListOptions) ApplyToList(lo *ListOptions)

type LoadOption

type LoadOption interface {
	ApplyToLoad(*LoadOptions)
}

type LoadOptions

type LoadOptions struct {
	Proxy types.NamespacedName
}

func (*LoadOptions) ApplyOptions

func (o *LoadOptions) ApplyOptions(opts []LoadOption) *LoadOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*LoadOptions) ApplyToLoad

func (o *LoadOptions) ApplyToLoad(lo *LoadOptions)

type OnceOption

type OnceOption interface {
	ApplyToOnce(*OnceOptions)
}

type OnceOptions

type OnceOptions struct {
	Proxy types.NamespacedName
}

func (*OnceOptions) ApplyOptions

func (o *OnceOptions) ApplyOptions(opts []OnceOption) *OnceOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*OnceOptions) ApplyToOnce

func (o *OnceOptions) ApplyToOnce(lo *OnceOptions)

type ResultOption added in v0.0.17

type ResultOption interface {
	ApplyToDiff(*ResultOptions)
}

type ResultOptions added in v0.0.17

type ResultOptions struct {
	Proxy types.NamespacedName
}

func (*ResultOptions) ApplyOptions added in v0.0.17

func (o *ResultOptions) ApplyOptions(opts []ResultOption) *ResultOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*ResultOptions) ApplyToDiff added in v0.0.17

func (o *ResultOptions) ApplyToDiff(lo *ResultOptions)

type StartOption

type StartOption interface {
	// ApplyToGet applies this configuration to the given get options.
	ApplyToStart(*StartOptions)
}

type StartOptions

type StartOptions struct {
	Proxy types.NamespacedName
}

func (*StartOptions) ApplyOptions

func (o *StartOptions) ApplyOptions(opts []StartOption) *StartOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*StartOptions) ApplyToStart

func (o *StartOptions) ApplyToStart(lo *StartOptions)

type StopOption

type StopOption interface {
	ApplyToStop(*StopOptions)
}

type StopOptions

type StopOptions struct {
	Proxy types.NamespacedName
}

func (*StopOptions) ApplyOptions

func (o *StopOptions) ApplyOptions(opts []StopOption) *StopOptions

ApplyOptions applies the given get options on these options, and then returns itself (for convenient chaining).

func (*StopOptions) ApplyToStop

func (o *StopOptions) ApplyToStop(lo *StopOptions)

Jump to

Keyboard shortcuts

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