chipingressset

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 23 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DEFAULT_STACK_NAME = "chip-ingress"

	DEFAULT_CHIP_INGRESS_GRPC_PORT    = "50051"
	DEFAULT_CHIP_INGRESS_SERVICE_NAME = "chip-ingress"

	DEFAULT_RED_PANDA_SCHEMA_REGISTRY_PORT = "18081"
	DEFAULT_RED_PANDA_KAFKA_PORT           = "19092"
	DEFAULT_RED_PANDA_SERVICE_NAME         = "redpanda-0"

	DEFAULT_RED_PANDA_CONSOLE_SERVICE_NAME = "redpanda-console"
	DEFAULT_RED_PANDA_CONSOLE_PORT         = "8080"
)

Variables

This section is empty.

Functions

func CreateTopics

func CreateTopics(ctx context.Context, kafkaAddress string, topics []string) error

func DefaultRegisterAndFetchProtos

func DefaultRegisterAndFetchProtos(ctx context.Context, client *github.Client, protoSchemaSets []ProtoSchemaSet, schemaRegistryURL string) error

func DefaultSubjectNamingStrategy

func DefaultSubjectNamingStrategy(subjectPrefix string, proto protoFile, protoSchemaSet ProtoSchemaSet) (string, error)

func DeleteAllTopics

func DeleteAllTopics(ctx context.Context, kafkaAddress string) error

func RegisterAndFetchProtos

func RegisterAndFetchProtos(ctx context.Context, client *github.Client, protoSchemaSets []ProtoSchemaSet, schemaRegistryURL string, repoToSubjectNamingStrategy RepositoryToSubjectNamingStrategyFn) error

Types

type ChipIngressOutput

type ChipIngressOutput struct {
	GRPCInternalURL string `toml:"grpc_internal_url"`
	GRPCExternalURL string `toml:"grpc_external_url"`
}

type Input

type Input struct {
	ComposeFile         string   `toml:"compose_file"`
	ExtraDockerNetworks []string `toml:"extra_docker_networks"`
	Output              *Output  `toml:"output"`
	UseCache            bool     `toml:"use_cache"`
}

type Output

type Output struct {
	ChipIngress *ChipIngressOutput `toml:"chip_ingress"`
	RedPanda    *RedPandaOutput    `toml:"redpanda"`
}

func New

func New(in *Input) (*Output, error)

type ProtoSchemaSet

type ProtoSchemaSet struct {
	URI           string   `toml:"uri"`
	Ref           string   `toml:"ref"`            // ref or tag or commit SHA
	Folders       []string `toml:"folders"`        // if not provided, all protos will be fetched, otherwise only protos in these folders will be fetched
	SubjectPrefix string   `toml:"subject_prefix"` // optional prefix for subjects
	ExcludeFiles  []string `toml:"exclude_files"`  // files to exclude from registration (e.g., ['workflows/v2/execution_status.proto'])
}

type RedPandaOutput

type RedPandaOutput struct {
	SchemaRegistryInternalURL string `toml:"schema_registry_internal_url"`
	SchemaRegistryExternalURL string `toml:"schema_registry_external_url"`
	KafkaInternalURL          string `toml:"kafka_internal_url"`
	KafkaExternalURL          string `toml:"kafka_external_url"`
	ConsoleExternalURL        string `toml:"console_external_url"`
}

type RepositoryToSubjectNamingStrategyFn

type RepositoryToSubjectNamingStrategyFn map[string]SubjectNamingStrategyFn

RepositoryToSubjectNamingStrategyFn is a map of repository names to SubjectNamingStrategyFn functions

type SubjectNamingStrategyFn

type SubjectNamingStrategyFn func(subjectPrefix string, protoFile protoFile, repoConfig ProtoSchemaSet) (string, error)

SubjectNamingStrategyFn is a function that is used to determine the subject name for a given proto file in a given repo

Jump to

Keyboard shortcuts

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