options

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithOptions

func WithOptions(ctx context.Context, options Options) context.Context

WithOptions returns a new context with the given Options

Types

type Key

type Key struct{}

Key is the context key for Options

type Options

type Options struct {
	// Interruption enables the interruption controller
	Interruption bool

	// APIKey is the IBM Cloud API key used for authentication
	APIKey string
	// Region is the IBM Cloud region to operate in
	Region string
	// Zone is the availability zone within the region
	Zone string
	// ResourceGroupID is the ID of the resource group to use
	ResourceGroupID string
}

Options contains operator configuration

func FromContext

func FromContext(ctx context.Context) Options

FromContext retrieves Options from the context

func NewOptions

func NewOptions() Options

NewOptions creates a new Options instance with values from environment variables

func (*Options) Validate

func (o *Options) Validate() error

Validate checks if all required options are properly set

Jump to

Keyboard shortcuts

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