config

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCallout

type AuthCallout struct {
	// Issuer ...
	Issuer string `json:"issuer"`
	// AuthUsers ...
	AuthUsers []string `json:"auth_users"`
	// Account ...
	Account string `json:"account"`
	// XKey ...
	XKey string `json:"xkey"`
}

AuthCallout ...

type Authorization

type Authorization struct {
	User        *string      `json:"user,omitempty"`
	Password    *string      `json:"password,omitempty"`
	Token       *string      `json:"token,omitempty"`
	Timeout     *int         `json:"timeout,omitempty"`
	AuthCallout *AuthCallout `json:"auth_callout,omitempty"`
}

Authorization ...

type Block

type Block interface {
	// contains filtered or unexported methods
}

Block is an interface for a configuration block.

type Block_Array

type Block_Array struct{}

Block_Array represents an array of a configuration block.

type Block_Include

type Block_Include struct{}

Block_Include

type Block_Object

type Block_Object struct{}

Block_Object represents an object of a configuration block.

type Block_String

type Block_String struct {
	// Value ...
	Value string
}

Block_String ...

type Config

type Config struct {
	// Host ...
	Host *string `json:"host,omitempty"`
	// Port ...
	Port *int `json:"port,omitempty"`
	// HTTPPort ...
	HTTPPort *int `json:"http_port,omitempty"`
	// Gateway ...
	Gateway *Gateway `json:"gateway,omitempty"`
	// ClientAdvertise ...
	ClientAdvertise *string `json:"client_advertise,omitempty"`
	// TLS ...
	TLS *TLS `json:"tls,omitempty"`
}

Config ...

func Default

func Default() *Config

Default ...

func New

func New() *Config

New returns a new Config object.

func (*Config) Marshal

func (c *Config) Marshal() ([]byte, error)

Marshal ...

func (*Config) Unmarshal

func (c *Config) Unmarshal(data []byte) error

Unmarshal ...

type Gateway

type Gateway struct {
	// Name ...
	Name string `json:"name"`
	// RejectUnknownCluster ...
	RejectUnknownCluster *bool `json:"reject_unknown_cluster,omitempty"`
	// Authorization ...
	Authorization *Authorization `json:"authorization,omitempty"`
	// Host ...
	Host *string `json:"host,omitempty"`
	// Port ...
	Port *int `json:"port,omitempty"`
	// Listen ...
	Listen *string `json:"listen,omitempty"`
	// Advertise ...
	Advertise *string `json:"advertise,omitempty"`
	// ConnectTimeout ...
	ConnectRetries *int `json:"connect_retries,omitempty"`
}

Gateway ...

type GatewayEntry

type GatewayEntry struct {
	// Name ...
	Name string `json:"name"`
	// URLS ...
	URLS []string `json:"urls"`
	// TLS ...
	TLS *TLS `json:"tls,omitempty"`
}

GatewayEntry ...

type JetStream

type JetStream struct {
	// Enabled ...
	Enabled bool `json:"enabled" default:"true"`
	// StoreDir ...
	StoreDir string `json:"store_dir" default:"/tmp/nats/jetstream"`
	// MaxMemoryStore ...
	MaxMemoryStore *int `json:"max_memory_store,omitempty"`
	// MaxFileStore ...
	MaxFileStore *int `json:"max_file_store,omitempty"`
	// Domain ...
	Domain *string `json:"domain,omitempty"`
	// EncryptionKey ...
	EncryptionKey *string `json:"encryption_key,omitempty"`
	// Cipher ...
	Cipher *string `json:"cipher,omitempty"`
	// ExtensionHint ...
	ExtensionHint *string `json:"extension_hint,omitempty"`
	// Limits ...
	Limits *JetStreamLimits `json:"limits,omitempty"`
	// UniqueTag ...
	UniqueTag *string `json:"unique_tag,omitempty"`
	// MaxOutStandingCatchUp ...
	MaxOutStandingCatchUp *string `json:"max_outstanding_catchup,omitempty" default:"32M"`
	// SyncInterval ...
	SyncInterval *string `json:"sync_interval,omitempty" default:"2m"`
}

JetStream ...

type JetStreamLimits

type JetStreamLimits struct {
	// MaxAckPending ...
	MaxAckPending *int `json:"max_ack_pending,omitempty"`
	// MaxHaAssets ...
	MaxHaAssets *int `json:"max_ha_assets,omitempty"`
	// MaxRequestBatch ...
	MaxRequestBatch *int `json:"max_request_batch,omitempty"`
	// DuplicateWindow ...
	DuplicateWindow *int `json:"duplicate_window,omitempty"`
}

JetStreamLimits ...

type Property

type Property struct {
	// Name ...
	Name string
	// Block is the configuration block.
	Block isBlock_Block
}

Property ...

func (*Property) GetBlock

func (c *Property) GetBlock() isBlock_Block

GetBlock ...

type TLS

type TLS struct {
	// CertFile ...
	CertFile string `json:"cert_file"`
	// KeyFile ...
	KeyFile string `json:"key_file"`
	// CAFile ...
	CAFile string `json:"ca_file"`
	// CipherSuites ...
	CipherSuites *string `json:"cipher_suites"`
	// CurvePreferences ...
	CurvePreferences *string `json:"curve_preferences,omitempty"`
	// Insecure ...
	Insecure *bool `json:"insecure,omitempty"`
	// Verify ...
	Verify bool `json:"verify"`
	// VerifyAndMap ...
	VerifyAndMap bool `json:"verify_and_map"`
	// VerifyCertAndCheckKnownURLs ...
	VerifyCertAndCheckKnownURLs *bool `json:"verify_cert_and_check_known_urls,omitempty"`
	// ConnectionRateLimit ...
	ConnectionRateLimit *int `json:"connection_rate_limit,omitempty"`
	// PinnedCerts ...
	PinnedCerts []string `json:"pinned_certs"`
}

TLS ...

Jump to

Keyboard shortcuts

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