datastore

package
v0.0.0-...-ed06964 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const DataStoreSingleID id.ID = "current"
View Source
const ResourceName = "DataStore"
View Source
const ResourceNamePlural = "DataStores"

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSXRayConfig

type AWSXRayConfig struct {
	Region          string `json:"region"`
	AccessKeyID     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
	SessionToken    string `json:"sessionToken"`
	UseDefaultAuth  bool   `json:"useDefaultAuth"`
}

type AzureAppInsightsConfig

type AzureAppInsightsConfig struct {
	UseAzureActiveDirectoryAuth bool            `json:"useAzureActiveDirectoryAuth"`
	AccessToken                 string          `json:"accessToken"`
	ResourceArmId               string          `json:"resourceArmId"`
	ConnectionType              ConnectionTypes `json:"connectionType"`
}

type ConnectionTypes

type ConnectionTypes string
const (
	ConnectionTypesDirect    ConnectionTypes = "direct"
	ConnectionTypesCollector ConnectionTypes = "collector"
)

type DataStore

type DataStore struct {
	ID        id.ID           `json:"id"`
	Name      string          `json:"name"`
	Type      DataStoreType   `json:"type"`
	Default   bool            `json:"default"`
	Values    DataStoreValues `json:"values"`
	CreatedAt string          `json:"createdAt"`
}

func (DataStore) GetID

func (ds DataStore) GetID() id.ID

func (DataStore) HasID

func (ds DataStore) HasID() bool

func (DataStore) IsOTLPBasedProvider

func (ds DataStore) IsOTLPBasedProvider() bool

func (DataStore) MarshalJSON

func (d DataStore) MarshalJSON() ([]byte, error)

func (DataStore) MarshalYAML

func (d DataStore) MarshalYAML() ([]byte, error)

func (*DataStore) UnmarshalJSON

func (d *DataStore) UnmarshalJSON(input []byte) error

func (*DataStore) UnmarshalYAML

func (d *DataStore) UnmarshalYAML(input []byte) error

func (DataStore) Validate

func (ds DataStore) Validate() error

type DataStoreType

type DataStoreType string
const (
	DataStoreTypeJaeger           DataStoreType = "jaeger"
	DataStoreTypeTempo            DataStoreType = "tempo"
	DataStoreTypeOpenSearch       DataStoreType = "opensearch"
	DataStoreTypeSignalFX         DataStoreType = "signalfx"
	DataStoreTypeOTLP             DataStoreType = "otlp"
	DataStoreTypeNewRelic         DataStoreType = "newrelic"
	DataStoreTypeLighStep         DataStoreType = "lightstep"
	DataStoreTypeElasticAPM       DataStoreType = "elasticapm"
	DataStoreTypeDataDog          DataStoreType = "datadog"
	DataStoreTypeAwsXRay          DataStoreType = "awsxray"
	DataStoreTypeHoneycomb        DataStoreType = "honeycomb"
	DatastoreTypeAzureAppInsights DataStoreType = "azureappinsights"
	DatastoreTypeSignoz           DataStoreType = "signoz"
	DatastoreTypeDynatrace        DataStoreType = "dynatrace"
	DatastoreTypeAgent            DataStoreType = "agent"
)

type DataStoreValues

type DataStoreValues struct {
	AwsXRay          *AWSXRayConfig            `json:"awsxray,omitempty"`
	ElasticApm       *ElasticSearchConfig      `json:"elasticapm,omitempty"`
	Jaeger           *GRPCClientSettings       `json:"jaeger,omitempty"`
	OpenSearch       *ElasticSearchConfig      `json:"opensearch,omitempty"`
	SignalFx         *SignalFXConfig           `json:"signalfx,omitempty"`
	Tempo            *MultiChannelClientConfig `json:"tempo,omitempty"`
	AzureAppInsights *AzureAppInsightsConfig   `json:"azureappinsights,omitempty"`
}

type ElasticSearchConfig

type ElasticSearchConfig struct {
	Addresses          []string `json:"addresses"`
	Username           string   `json:"username"`
	Password           string   `json:"password"`
	Index              string   `json:"index"`
	Certificate        string   `json:"certificate"`
	InsecureSkipVerify bool     `json:"insecureSkipVerify"`
}

type GRPCClientSettings

type GRPCClientSettings struct {
	Endpoint        string            `json:"endpoint,omitempty"`
	ReadBufferSize  int               `json:"readBufferSize,omitempty"`
	WriteBufferSize int               `json:"writeBufferSize,omitempty"`
	WaitForReady    bool              `json:"waitForReady,omitempty"`
	Headers         map[string]string `json:"headers,omitempty"`
	BalancerName    string            `json:"balancerName,omitempty"`
	Compression     GRPCCompression   `json:"compression,omitempty"`
	TLS             *TLS              `json:"tls,omitempty"`
}

type GRPCCompression

type GRPCCompression string
const (
	GRPCCompressionGZip    GRPCCompression = "gzip"
	GRPCCompressionZlib    GRPCCompression = "zlib"
	GRPCCompressionDeflate GRPCCompression = "deflate"
	GRPCCompressionSnappy  GRPCCompression = "snappy"
	GRPCCompressionZstd    GRPCCompression = "zstd"
	GRPCCompressionNone    GRPCCompression = "none"
)

type HttpClientConfig

type HttpClientConfig struct {
	Url     string            `json:"url"`
	Headers map[string]string `json:"headers,omitempty"`
	TLS     *TLS              `json:"tls,omitempty"`
}

type MultiChannelClientConfig

type MultiChannelClientConfig struct {
	Type MultiChannelClientType `json:"type"`
	Grpc *GRPCClientSettings    `json:"grpc,omitempty"`
	Http *HttpClientConfig      `json:"http,omitempty"`
}

type MultiChannelClientType

type MultiChannelClientType string
const (
	MultiChannelClientTypeGRPC MultiChannelClientType = "grpc"
	MultiChannelClientTypeHTTP MultiChannelClientType = "http"
)

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(db *sql.DB) *Repository

func (*Repository) Count

func (r *Repository) Count(ctx context.Context, query string) (int, error)

func (*Repository) Create

func (r *Repository) Create(ctx context.Context, updated DataStore) (DataStore, error)

func (*Repository) Current

func (r *Repository) Current(ctx context.Context) (DataStore, error)

func (*Repository) Delete

func (r *Repository) Delete(ctx context.Context, id id.ID) error

func (*Repository) Get

func (r *Repository) Get(ctx context.Context, id id.ID) (DataStore, error)

func (*Repository) List

func (r *Repository) List(ctx context.Context, take, skip int, query, sortBy, sortDirection string) ([]DataStore, error)

func (*Repository) Provision

func (r *Repository) Provision(ctx context.Context, dataStore DataStore) error

func (*Repository) SetID

func (r *Repository) SetID(dataStore DataStore, id id.ID) DataStore

func (*Repository) SortingFields

func (*Repository) SortingFields() []string

func (*Repository) Update

func (r *Repository) Update(ctx context.Context, dataStore DataStore) (DataStore, error)

type SignalFXConfig

type SignalFXConfig struct {
	Realm string `json:"realm"`
	Token string `json:"token"`
}

type TLS

type TLS struct {
	Insecure           bool        `json:"insecure,omitempty"`
	InsecureSkipVerify bool        `json:"insecureSkipVerify,omitempty"`
	ServerName         string      `json:"serverName,omitempty"`
	Settings           *TLSSetting `json:"settings,omitempty"`
}

type TLSSetting

type TLSSetting struct {
	CAFile     string `json:"cAFile,omitempty"`
	CertFile   string `json:"certFile,omitempty"`
	KeyFile    string `json:"keyFile,omitempty"`
	MinVersion string `json:"minVersion,omitempty"`
	MaxVersion string `json:"maxVersion,omitempty"`
}

Jump to

Keyboard shortcuts

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