config

package
v0.4.15 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	KCP struct {
		// Kubeconfig is the path to the KCP kubeconfig file
		Kubeconfig string `mapstructure:"kcp-kubeconfig" envconfig:"default=/api-kubeconfig/kubeconfig"`
	} `mapstructure:",squash"`

	SearchableResource struct {
		Resources []schema.GroupVersionKind `mapstructure:"resources" envconfig:"default={core.platform-mesh.io;v1alpha1;Account}"`
	} `mapstructure:",squash"`

	OpenSearch struct {
		// URL is the OpenSearch endpoint URL
		URL string `mapstructure:"opensearch-url"  envconfig:"default=https://opensearch.portal.localhost:8443"`
		// Username for OpenSearch authentication
		Username string `mapstructure:"opensearch-username" envconfig:"default=admin"`
		// Password for OpenSearch authentication
		Password string `mapstructure:"opensearch-password" envconfig:"default=admin"`
		// IndexNamePrefix is a static prefix for all operator-managed index names and aliases.
		IndexNamePrefix string `mapstructure:"opensearch-index-name-prefix" envconfig:"default=pm-orgs"`
		// SemanticModelID is the OpenSearch ML model ID used for semantic field mappings.
		SemanticModelID string `mapstructure:"opensearch-semantic-model-id" envconfig:"optional,OPENSEARCH_SEMANTIC_MODEL_ID"`
	} `mapstructure:",squash"`
}

Config holds the configuration for the search-operator

func NewFromEnv

func NewFromEnv() (*Config, error)

NewFromEnv creates a Config from environment values

func (Config) InitializerName

func (c Config) InitializerName() string

Jump to

Keyboard shortcuts

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