firehose

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResetToDateTime = "DATETIME"
	ResetToEarliest = "EARLIEST"
	ResetToLatest   = "LATEST"
)
View Source
const (
	StopAction    = "stop"
	StartAction   = "start"
	ScaleAction   = "scale"
	ResetAction   = "reset"
	UpgradeAction = "upgrade"
)

Variables

View Source
var (
	ErrNetwork = worker.RetryableError{RetryAfter: networkErrorRetryDuration}
	ErrKubeAPI = worker.RetryableError{RetryAfter: kubeAPIRetryBackoffDuration}
)
View Source
var Module = module.Descriptor{
	Kind: "firehose",
	Dependencies: map[string]string{
		// contains filtered or unexported fields
	},
	Actions: []module.ActionDesc{
		{
			Name:        module.CreateAction,
			Description: "Creates firehose instance.",
			ParamSchema: completeConfigSchema,
		},
		{
			Name:        module.UpdateAction,
			Description: "Updates an existing firehose instance.",
			ParamSchema: completeConfigSchema,
		},
		{
			Name:        ScaleAction,
			Description: "Scale-up or scale-down an existing firehose instance.",
			ParamSchema: scaleActionSchema,
		},
		{
			Name:        StopAction,
			Description: "Stop firehose and all its components.",
		},
		{
			Name:        StartAction,
			Description: "Start firehose and all its components.",
		},
		{
			Name:        ResetAction,
			Description: "Reset firehose kafka consumer group to given timestamp",
			ParamSchema: resetActionSchema,
		},
		{
			Name:        UpgradeAction,
			Description: "Upgrade firehose to current stable version",
		},
	},
	DriverFactory: func(conf json.RawMessage) (module.Driver, error) {
		driverCfg := driverConfig{
			ChartRepository: "https://odpf.github.io/charts/",
			ChartName:       "firehose",
			ChartVersion:    "0.1.3",
			ImageRepository: "gotocompany/firehose",
			ImageName:       "firehose",
			ImageTag:        "latest",
			Namespace:       "firehose",
			ImagePullPolicy: "IfNotPresent",
		}

		if err := json.Unmarshal(conf, &driverCfg); err != nil {
			return nil, err
		}

		return &firehoseDriver{
			Config: driverCfg,
		}, nil
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	State    string                 `json:"state"`
	StopTime *time.Time             `json:"stop_time"`
	Telegraf map[string]interface{} `json:"telegraf"`
	Firehose struct {
		Replicas           int               `json:"replicas"`
		KafkaBrokerAddress string            `json:"kafka_broker_address"`
		KafkaTopic         string            `json:"kafka_topic"`
		KafkaConsumerID    string            `json:"kafka_consumer_id"`
		EnvVariables       map[string]string `json:"env_variables"`
		DeploymentID       string            `json:"deployment_id,omitempty"`
	} `json:"firehose"`
}

type Output

type Output struct {
	Namespace   string       `json:"namespace,omitempty"`
	ReleaseName string       `json:"release_name,omitempty"`
	Pods        []kube.Pod   `json:"pods,omitempty"`
	Defaults    driverConfig `json:"defaults,omitempty"`
}

Jump to

Keyboard shortcuts

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