kustainer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCluster

func WithCluster(ctx context.Context, k *k3s.K3sContainer) testcontainers.CustomizeRequestOption

func WithStarted

func WithStarted() testcontainers.CustomizeRequestOption

WithStarted will start the container when it is created. You don't want to do this if you want to load the container into a k8s cluster.

Types

type IngestionBatchingPolicy

type IngestionBatchingPolicy struct {
	MaximumBatchingTimeSpan time.Duration `json:"MaximumBatchingTimeSpan,omitempty"`
	MaximumNumberOfItems    int           `json:"MaximumNumberOfItems,omitempty"`
	MaximumRawDataSizeMB    int           `json:"MaximumRawDataSizeMB,omitempty"`
}

func (IngestionBatchingPolicy) MarshalJSON

func (p IngestionBatchingPolicy) MarshalJSON() ([]byte, error)

MarshalJSON customizes the JSON representation of IngestionBatchingPolicy

func (IngestionBatchingPolicy) String

func (p IngestionBatchingPolicy) String() string

Custom String method to format duration as "00:00:01"

func (*IngestionBatchingPolicy) UnmarshalJSON

func (p *IngestionBatchingPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON customizes the JSON unmarshalling of IngestionBatchingPolicy

type KustainerContainer

type KustainerContainer struct {
	testcontainers.Container
	// contains filtered or unexported fields
}

func Run

func Run(ctx context.Context, img string, opts ...testcontainers.ContainerCustomizer) (*KustainerContainer, error)

func (*KustainerContainer) Close

func (c *KustainerContainer) Close() error

func (*KustainerContainer) ConnectionUrl

func (c *KustainerContainer) ConnectionUrl() string

func (*KustainerContainer) CreateDatabase

func (c *KustainerContainer) CreateDatabase(ctx context.Context, dbName string) error

func (*KustainerContainer) PortForward

func (c *KustainerContainer) PortForward(ctx context.Context, config *rest.Config) error

func (*KustainerContainer) SetIngestionBatchingPolicy

func (c *KustainerContainer) SetIngestionBatchingPolicy(ctx context.Context, dbName string, p IngestionBatchingPolicy) error

Jump to

Keyboard shortcuts

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