provider

package
v0.40.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedStorageProvider = errors.New("unsupported queue provider")
)

Functions

This section is empty.

Types

type APIServerOptions

type APIServerOptions struct {
	// Context configures the Kubernetes context name to use for the connection. Use this for NON-production scenarios to test
	// against a specific cluster.
	Context string `yaml:"context"`

	// Namespace configures the Kubernetes namespace used for data-storage. The namespace must already exist.
	Namespace string `yaml:"namespace"`
}

APIServerOptions represents options for the configuring the Kubernetes APIServer store.

type InMemoryQueueOptions

type InMemoryQueueOptions struct {
}

InMemoryQueueOptions represents the inmemory queue options.

type QueueProvider

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

QueueProvider is the provider to create and manage queue client.

func New

New creates new QueueProvider instance.

func (*QueueProvider) GetClient

func (p *QueueProvider) GetClient(ctx context.Context) (queue.Client, error)

GetClient creates or gets queue client.

func (*QueueProvider) SetClient

func (p *QueueProvider) SetClient(client queue.Client)

SetClient sets the queue client for the QueueProvider. This should be used by tests that need to mock the queue client.

type QueueProviderOptions

type QueueProviderOptions struct {
	// Provider configures the storage provider.
	Provider QueueProviderType `yaml:"provider"`

	// Name represents the unique name of queue.
	Name string `yaml:"name"`

	// InMemory represents inmemory queue client options. (Optional)
	InMemory *InMemoryQueueOptions `yaml:"inMemoryQueue,omitempty"`

	// APIServer configures options for the Kubernetes APIServer store. (Optional)
	APIServer APIServerOptions `yaml:"apiserver,omitempty"`
}

QueueProviderOptions represents the data storage provider options.

type QueueProviderType

type QueueProviderType string

QueueProviderType represents types of queue provider.

const (
	// TypeInmemory represents inmemory queue provider.
	TypeInmemory QueueProviderType = "inmemory"

	// TypeAPIServer represents the Kubernetes APIServer provider.
	TypeAPIServer QueueProviderType = "apiserver"
)

Jump to

Keyboard shortcuts

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