system

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheConfig

type CacheConfig struct {
	Enabled bool
	URL     string
}

type DBConfig

type DBConfig struct {
	Enabled bool
	URL     string
}

type NatsConfig

type NatsConfig struct {
	Enabled    bool
	URL        string
	ClientName string
}

type OTelConfig

type OTelConfig struct {
	Enabled bool
	URL     string

	ServiceModule     string
	ServiceName       string
	ServiceVersion    string
	ServiceInstanceID string
}

func NewOTelConfig

func NewOTelConfig(module string, name string, version string, instanceID string) *OTelConfig

func (*OTelConfig) WithURL

func (c *OTelConfig) WithURL(url string) *OTelConfig

type Stub

type Stub struct {
	Cache cache.Cache
	DB    *mongo.Client
	OTel  otel.Telemetry
	Nats  *nats.Conn
	Vault vault.VaultServiceClient
	// contains filtered or unexported fields
}

func NewStub

func NewStub(config *StubConfig) *Stub

func (*Stub) Close

func (s *Stub) Close(ctx context.Context)

func (*Stub) Connect

func (s *Stub) Connect(ctx context.Context) error

type StubConfig

type StubConfig struct {
	Cache CacheConfig
	Nats  NatsConfig
	Db    DBConfig
	OTel  OTelConfig
	Vault VaultConfig
}

func NewSystemStubConfig

func NewSystemStubConfig() *StubConfig

func (*StubConfig) WithCache

func (s *StubConfig) WithCache(config ...CacheConfig) *StubConfig

func (*StubConfig) WithDB

func (s *StubConfig) WithDB(config ...DBConfig) *StubConfig

func (*StubConfig) WithNats

func (s *StubConfig) WithNats(config ...NatsConfig) *StubConfig

func (*StubConfig) WithOTel

func (s *StubConfig) WithOTel(config *OTelConfig) *StubConfig

func (*StubConfig) WithVault added in v0.0.3

func (s *StubConfig) WithVault(config ...VaultConfig) *StubConfig

type VaultConfig added in v0.0.3

type VaultConfig struct {
	Enabled bool
	URL     string
}

Directories

Path Synopsis
proto

Jump to

Keyboard shortcuts

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