v1alpha1

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PatchTypeJSONPatch is the default patch type using JSON Patch (RFC 6902).
	PatchTypeJSONPatch = "jsonpatch"
)

Variables

This section is empty.

Functions

func Merge

func Merge(base, overrides any) error

func MergeCastingSpecAndStatus

func MergeCastingSpecAndStatus(base *Casting) error

Types

type Casting

type Casting struct {
	TypeVersion `json:",inline" yaml:",inline"`

	// Metadata of the casting configuration.
	Metadata TypeMetadata `json:"metadata" yaml:"metadata" description:"Metadata of the casting configuration"`

	// Specification for the casting.
	Spec CastingSpec `json:"spec" yaml:"spec" description:"Specification for the casting"`

	// Status of the casting.
	Status CastingStatus `json:"status,omitzero" yaml:"status,omitempty" description:"Status of the casting"`
}

func DefaultCasting

func DefaultCasting() Casting

func ExampleCasting

func ExampleCasting() Casting

ExampleCasting returns a minimal casting with only the deployment spec set. The forge pipeline enriches and expands defaults; the full state is written to the lock file, not the casting.yaml.

type CastingSpec

type CastingSpec struct {
	// Mode platform in which the platform will run.
	Deployment TypeDeployment `json:"deployment" yaml:"deployment" description:"Deployment configuration for the platform"`

	// Infrastructure configuration for generating infrastructure manifests (e.g., Terraform).
	Infrastructure Infrastructure `json:"infrastructure,omitzero" yaml:"infrastructure,omitzero"`
	// Patches are patch operations applied to generated output files.
	Patches []PatchEntry `json:"patches,omitempty" yaml:"patches,omitempty" description:"Patch operations to apply to generated materials"`

	// The configuration for the signoz molding.
	Signoz SigNoz `json:"signoz,omitzero" yaml:"signoz,omitempty" description:"The configuration for the SigNoz molding"`

	// The configuration for the telemetry store molding.
	TelemetryStore TelemetryStore `` /* 126-byte string literal not displayed */

	// The configuration for the telemetry keeper molding.
	TelemetryKeeper TelemetryKeeper `` /* 129-byte string literal not displayed */

	// The configuration for the meta store molding.
	MetaStore MetaStore `json:"metastore,omitzero" yaml:"metastore,omitempty" description:"The configuration for the meta store molding"`

	// The configuration for the ingester molding.
	Ingester Ingester `json:"ingester,omitzero" yaml:"ingester,omitempty" description:"The configuration for the ingester molding"`
}

type CastingStatus

type CastingStatus struct {
	// Checksum of the casting file.
	Checksum string `json:"checksum" yaml:"checksum" description:"Checksum of the casting file"`
}

type Infrastructure added in v0.0.7

type Infrastructure struct {
	// Whether infrastructure manifest generation is enabled
	Enabled bool `json:"enabled" yaml:"enabled"`

	// Status holds the generated IaC file contents keyed by filename (e.g. "main.tf.json").
	// This is populated by foundry after generation and written to the lock file.
	Status map[string]string `json:"status,omitempty" yaml:"status,omitempty"`
}

Infrastructure holds the configuration for infrastructure manifest generation (e.g., Terraform). The cloud provider is resolved automatically from spec.deployment.platform — no provider field is needed here.

func DefaultInfrastructure added in v0.0.7

func DefaultInfrastructure() Infrastructure

DefaultInfrastructure returns the default Infrastructure configuration.

func (Infrastructure) MarshalJSON added in v0.0.7

func (i Infrastructure) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler. It manually omits Status when zero so that the strategic merge patch doesn't overwrite defaults with empty values.

type InfrastructureProvider added in v0.0.7

type InfrastructureProvider struct {
	// contains filtered or unexported fields
}
var (
	InfrastructureProviderAWS   InfrastructureProvider = InfrastructureProvider{/* contains filtered or unexported fields */}
	InfrastructureProviderGCP   InfrastructureProvider = InfrastructureProvider{/* contains filtered or unexported fields */}
	InfrastructureProviderAzure InfrastructureProvider = InfrastructureProvider{/* contains filtered or unexported fields */}
)

func InfrastructureProviders added in v0.0.7

func InfrastructureProviders() []InfrastructureProvider

func (InfrastructureProvider) IsZero added in v0.0.7

func (p InfrastructureProvider) IsZero() bool

func (InfrastructureProvider) MarshalJSON added in v0.0.7

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

func (InfrastructureProvider) MarshalText added in v0.0.7

func (p InfrastructureProvider) MarshalText() ([]byte, error)

func (InfrastructureProvider) MarshalYAML added in v0.0.7

func (p InfrastructureProvider) MarshalYAML() (any, error)

func (InfrastructureProvider) String added in v0.0.7

func (p InfrastructureProvider) String() string

func (*InfrastructureProvider) UnmarshalJSON added in v0.0.7

func (p *InfrastructureProvider) UnmarshalJSON(text []byte) error

func (*InfrastructureProvider) UnmarshalText added in v0.0.7

func (p *InfrastructureProvider) UnmarshalText(text []byte) error

func (*InfrastructureProvider) UnmarshalYAML added in v0.0.7

func (p *InfrastructureProvider) UnmarshalYAML(node *yaml.Node) error

type Ingester

type Ingester struct {
	// Specification for the ingester.
	Spec MoldingSpec `json:"spec" yaml:"spec" jsonschema:"description=Specification for the ingester"`

	// Status of the ingester.
	Status IngesterStatus `json:"status" yaml:"status,omitempty" jsonschema:"description=Status of the ingester"`
}

func DefaultIngester

func DefaultIngester() Ingester

type IngesterStatus

type IngesterStatus struct {
	MoldingStatus `json:",inline" yaml:",inline"`

	Addresses IngesterStatusAddresses `json:"addresses" yaml:"addresses,omitempty" jsonschema:"description=Addresses of the ingester"`
}

type IngesterStatusAddresses

type IngesterStatusAddresses struct {
	OTLP []string `json:"otlp" yaml:"otlp" jsonschema:"description=OTLP addresses"`
}

type MetaStore

type MetaStore struct {
	// Kind of the meta store to use.
	Kind MetaStoreKind `json:"kind,omitzero" yaml:"kind,omitempty" description:"Kind of the meta store to use" examples:"[\"postgres\",\"sqlite\"]"`

	// Specification for the meta store.
	Spec MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the meta store"`

	// Status of the meta store.
	Status MetaStoreStatus `json:"status" yaml:"status,omitempty" description:"Status of the meta store"`
}

func DefaultMetaStore

func DefaultMetaStore() MetaStore

type MetaStoreKind

type MetaStoreKind struct {
	// contains filtered or unexported fields
}
var (
	MetaStoreKindPostgres MetaStoreKind = MetaStoreKind{/* contains filtered or unexported fields */}
	MetaStoreKindSQLite   MetaStoreKind = MetaStoreKind{/* contains filtered or unexported fields */}
)

func MetaStoreKinds

func MetaStoreKinds() []MetaStoreKind

func (MetaStoreKind) MarshalJSON

func (kind MetaStoreKind) MarshalJSON() ([]byte, error)

func (MetaStoreKind) MarshalText

func (kind MetaStoreKind) MarshalText() ([]byte, error)

func (MetaStoreKind) MarshalYAML

func (kind MetaStoreKind) MarshalYAML() (any, error)

func (MetaStoreKind) String

func (kind MetaStoreKind) String() string

func (*MetaStoreKind) UnmarshalJSON

func (kind *MetaStoreKind) UnmarshalJSON(text []byte) error

func (*MetaStoreKind) UnmarshalText

func (kind *MetaStoreKind) UnmarshalText(text []byte) error

func (*MetaStoreKind) UnmarshalYAML

func (kind *MetaStoreKind) UnmarshalYAML(node *yaml.Node) error

type MetaStoreStatus

type MetaStoreStatus struct {
	MoldingStatus `json:",inline" yaml:",inline"`

	Addresses MetaStoreStatusAddresses `json:"addresses" yaml:"addresses,omitempty" description:"Addresses of the meta store"`
}

type MetaStoreStatusAddresses

type MetaStoreStatusAddresses struct {
	// DSN addresses.
	DSN []string `json:"dsn" yaml:"dsn" description:"DSN addresses"`
}

type MoldingKind

type MoldingKind struct {
	// contains filtered or unexported fields
}
var (
	MoldingKindIngester        MoldingKind = MoldingKind{/* contains filtered or unexported fields */}
	MoldingKindTelemetryStore  MoldingKind = MoldingKind{/* contains filtered or unexported fields */}
	MoldingKindTelemetryKeeper MoldingKind = MoldingKind{/* contains filtered or unexported fields */}
	MoldingKindMetaStore       MoldingKind = MoldingKind{/* contains filtered or unexported fields */}
	MoldingKindSignoz          MoldingKind = MoldingKind{/* contains filtered or unexported fields */}
)

func MoldingKinds

func MoldingKinds() []MoldingKind

func (MoldingKind) MarshalText

func (kind MoldingKind) MarshalText() ([]byte, error)

func (MoldingKind) MarshalYAML

func (kind MoldingKind) MarshalYAML() (any, error)

func (MoldingKind) String

func (kind MoldingKind) String() string

func (*MoldingKind) UnmarshalText

func (kind *MoldingKind) UnmarshalText(text []byte) error

func (*MoldingKind) UnmarshalYAML

func (kind *MoldingKind) UnmarshalYAML(node *yaml.Node) error

type MoldingSpec

type MoldingSpec struct {
	// Whether the molding is enabled
	Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" description:"Whether the molding is enabled" default:"true"`

	// Cluster configuration for the molding
	Cluster TypeCluster `json:"cluster" yaml:"cluster,omitempty" description:"Cluster configuration for the molding"`

	// The version of the molding to use
	Version string `json:"version,omitempty" yaml:"version,omitempty" description:"The version of the molding to use" example:"latest"`

	// Image of the molding
	Image string `json:"image,omitempty" yaml:"image,omitempty" description:"Container image of the molding" example:"signoz/signoz:latest"`

	// Environment variables for the molding
	Env map[string]string `json:"env,omitempty" yaml:"env,omitempty" description:"Environment variables for the molding"`

	// Configuration for the molding
	Config TypeConfig `json:"config" yaml:"config,omitempty" description:"Configuration for the molding"`
}

func (*MoldingSpec) IsEnabled added in v0.0.7

func (spec *MoldingSpec) IsEnabled() bool

IsEnabled returns whether the molding is enabled. Returns false if the receiver or Enabled is nil.

func (*MoldingSpec) MergeStatus

func (spec *MoldingSpec) MergeStatus(status MoldingStatus) error

type MoldingStatus

type MoldingStatus struct {
	// Extra information about the molding
	Extras map[string]string `json:"extras,omitempty" yaml:"extras,omitempty" description:"Extra information about the molding"`

	// Environment variables for the molding
	Env map[string]string `json:"env,omitempty" yaml:"env,omitempty" description:"Environment variables for the molding"`

	// Configuration for the molding
	Config TypeConfig `json:"config" yaml:"config,omitempty" description:"Configuration for the molding"`
}

type PatchEntry added in v0.0.2

type PatchEntry struct {
	// Type selects the patch driver. Defaults to "jsonpatch" if empty.
	Type string `` /* 139-byte string literal not displayed */

	// Target is the output file to patch, relative to the pours directory.
	Target string `` /* 215-byte string literal not displayed */

	// Operations is a list of JSON Patch (RFC 6902) operations to apply. Used by the jsonpatch driver.
	Operations []PatchOperation `` /* 142-byte string literal not displayed */
}

PatchEntry is a set of patch operations targeting a specific generated file.

func (PatchEntry) PatchType added in v0.0.2

func (pe PatchEntry) PatchType() string

PatchType returns the patch type, defaulting to PatchTypeJSONPatch if empty.

type PatchOperation added in v0.0.2

type PatchOperation struct {
	// Op is the JSON Patch (RFC 6902) operation type: add, remove, replace, move, copy, test.
	Op string `` /* 141-byte string literal not displayed */

	// Path is a JSON Pointer (RFC 6902) to the target location.
	Path string `json:"path" yaml:"path" description:"JSON Pointer (RFC 6901) to the target location" example:"/services/clickhouse/mem_limit"`

	// Value is the value for add, replace, or test operations.
	Value any `json:"value,omitempty" yaml:"value,omitempty" description:"Value for add, replace, or test operations"`

	// From is a JSON Pointer for the source location in move and copy operations.
	From string `` /* 147-byte string literal not displayed */
}

PatchOperation is a single JSON Patch (RFC 6902) operation. Used by the jsonpatch driver.

type SigNoz

type SigNoz struct {
	// Specification for signoz.
	Spec MoldingSpec `json:"spec" yaml:"spec" jsonschema:"description=Specification for SigNoz"`

	// Status of signoz.
	Status SigNozStatus `json:"status" yaml:"status,omitempty" jsonschema:"description=Status of SigNoz"`
}

func DefaultSigNoz

func DefaultSigNoz() SigNoz

type SigNozStatus

type SigNozStatus struct {
	MoldingStatus `json:",inline" yaml:",inline"`

	Addresses SigNozStatusAddresses `json:"addresses" yaml:"addresses,omitempty" jsonschema:"description=Addresses of SigNoz"`
}

type SigNozStatusAddresses

type SigNozStatusAddresses struct {
	// API server addresses.
	APIServer []string `json:"apiserver" yaml:"apiserver" jsonschema:"description=API server addresses"`

	// Opamp server addresses.
	Opamp []string `json:"opamp" yaml:"opamp" jsonschema:"description=Opamp server addresses"`
}

type TelemetryKeeper

type TelemetryKeeper struct {
	// Kind of the telemetry keeper to use.
	Kind TelemetryKeeperKind `` /* 126-byte string literal not displayed */

	// Specification for the telemetry keeper.
	Spec MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the telemetry keeper"`

	// Status of the telemetry keeper.
	Status TelemetryKeeperStatus `json:"status" yaml:"status,omitempty" description:"Status of the telemetry keeper"`
}

func DefaultTelemetryKeeper

func DefaultTelemetryKeeper() TelemetryKeeper

type TelemetryKeeperKind

type TelemetryKeeperKind struct {
	// contains filtered or unexported fields
}
var (
	TelemetryKeeperKindClickhouseKeeper TelemetryKeeperKind = TelemetryKeeperKind{/* contains filtered or unexported fields */}
)

func TelemetryKeeperKinds

func TelemetryKeeperKinds() []TelemetryKeeperKind

func (TelemetryKeeperKind) MarshalJSON

func (kind TelemetryKeeperKind) MarshalJSON() ([]byte, error)

func (TelemetryKeeperKind) MarshalText

func (kind TelemetryKeeperKind) MarshalText() ([]byte, error)

func (TelemetryKeeperKind) MarshalYAML

func (kind TelemetryKeeperKind) MarshalYAML() (any, error)

func (TelemetryKeeperKind) String

func (kind TelemetryKeeperKind) String() string

func (*TelemetryKeeperKind) UnmarshalJSON

func (kind *TelemetryKeeperKind) UnmarshalJSON(text []byte) error

func (*TelemetryKeeperKind) UnmarshalText

func (kind *TelemetryKeeperKind) UnmarshalText(text []byte) error

func (*TelemetryKeeperKind) UnmarshalYAML

func (kind *TelemetryKeeperKind) UnmarshalYAML(node *yaml.Node) error

type TelemetryKeeperStatus

type TelemetryKeeperStatus struct {
	MoldingStatus `json:",inline" yaml:",inline"`

	// Addresses of the telemetry keeper.
	Addresses TelemetryKeeperStatusAddresses `json:"addresses" yaml:"addresses,omitempty" description:"Addresses of the telemetry keeper"`
}

type TelemetryKeeperStatusAddresses

type TelemetryKeeperStatusAddresses struct {
	// Raft addresses.
	Raft []string `json:"raft" yaml:"raft,omitempty" description:"Raft addresses"`

	// Client addresses.
	Client []string `json:"client" yaml:"client,omitempty" description:"Client addresses"`
}

type TelemetryStore

type TelemetryStore struct {
	// Kind of the telemetry store to use.
	Kind TelemetryStoreKind `json:"kind,omitzero" yaml:"kind,omitempty" description:"Kind of the telemetry store to use" examples:"[\"clickhouse\"]"`

	// Specification for the telemetry store.
	Spec MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the telemetry store"`

	// Status of the telemetry store.
	Status TelemetryStoreStatus `json:"status" yaml:"status,omitempty" description:"Status of the telemetry store"`
}

func DefaultTelemetryStore

func DefaultTelemetryStore() TelemetryStore

type TelemetryStoreKind

type TelemetryStoreKind struct {
	// contains filtered or unexported fields
}
var (
	TelemetryStoreKindClickhouse TelemetryStoreKind = TelemetryStoreKind{/* contains filtered or unexported fields */}
)

func TelemetryStoreKinds

func TelemetryStoreKinds() []TelemetryStoreKind

func (TelemetryStoreKind) MarshalJSON

func (kind TelemetryStoreKind) MarshalJSON() ([]byte, error)

func (TelemetryStoreKind) MarshalText

func (kind TelemetryStoreKind) MarshalText() ([]byte, error)

func (TelemetryStoreKind) MarshalYAML

func (kind TelemetryStoreKind) MarshalYAML() (any, error)

func (TelemetryStoreKind) String

func (kind TelemetryStoreKind) String() string

func (*TelemetryStoreKind) UnmarshalJSON

func (kind *TelemetryStoreKind) UnmarshalJSON(text []byte) error

func (*TelemetryStoreKind) UnmarshalText

func (kind *TelemetryStoreKind) UnmarshalText(text []byte) error

func (*TelemetryStoreKind) UnmarshalYAML

func (kind *TelemetryStoreKind) UnmarshalYAML(node *yaml.Node) error

type TelemetryStoreStatus

type TelemetryStoreStatus struct {
	MoldingStatus `json:",inline" yaml:",inline"`

	Addresses TelemetryStoreStatusAddresses `json:"addresses" yaml:"addresses,omitempty" description:"Addresses of the telemetry store"`
}

type TelemetryStoreStatusAddresses

type TelemetryStoreStatusAddresses struct {
	// TCP addresses.
	TCP []string `json:"tcp" yaml:"tcp" description:"TCP addresses"`
}

type TypeCluster

type TypeCluster struct {
	// Number of replicas for the component
	Replicas *int `json:"replicas,omitempty" yaml:"replicas,omitempty" description:"Number of replicas for the component" example:"1"`

	// Number of shards for the component
	Shards *int `json:"shards,omitempty" yaml:"shards,omitempty" description:"Number of shards for the component" example:"1"`
}

type TypeConfig

type TypeConfig struct {
	// Data contains the configuration data.
	Data map[string]string `json:"data,omitempty" yaml:"data,omitempty" description:"Configuration data as key-value pairs"`
}

type TypeDeployment

type TypeDeployment struct {
	// Platform: Provider where an installation runs on using various cloud vendors
	// Example values: aws|gcp|azure|digitalocean|railway
	Platform string `` /* 193-byte string literal not displayed */

	// Mode: Type of installation method that we support, currently identifies the engine or technology behind a deployment
	Mode string `` /* 180-byte string literal not displayed */

	// Flavor: Defines the flavor of mode for the deployment, allows the user the pattern to deploy on
	Flavor string `` /* 208-byte string literal not displayed */
}

type TypeMetadata

type TypeMetadata struct {
	// The name of this installation. This name can be used to identify the installation.
	Name string `json:"name,omitempty" yaml:"name,omitempty" description:"The name of this installation" example:"signoz-dev"`

	// Annotations is an unstructured key-value map for arbitrary metadata.
	// Can be used to specify deployment-specific settings.
	Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty" description:"Unstructured key-value map for arbitrary metadata"`
}

type TypeVersion

type TypeVersion struct {
	// API Version of the casting configuration schema.
	APIVersion string `` /* 136-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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