config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Package config providers configuration type and load configuration logic

Index

Constants

View Source
const (
	// GOB represents gob algorithm.
	GOB compressAlgorithm = 1 + iota
	// GZIP represents gzip algorithm.
	GZIP
	// LZ4 represents lz4 algorithm.
	LZ4
	// ZSTD represents zstd algorithm.
	ZSTD
)

Variables

This section is empty.

Functions

func CompressAlgorithm

func CompressAlgorithm(ca string) compressAlgorithm

CompressAlgorithm returns compressAlgorithm converted from string.

func GetActualValue

func GetActualValue(val string) (res string)

GetActualValue returns the environment variable value if the val has prefix and suffix "_", if actual value start with file://{path} the return value will read from file otherwise the val will directly return.

func GetActualValues

func GetActualValues(vals []string) []string

GetActualValues returns the environment variable values if the vals has string slice that has prefix and suffix "_", if actual value start with file://{path} the return value will read from file otherwise the val will directly return.

func Read

func Read(path string, cfg interface{}) (err error)

Read returns config struct or error when decoding the configuration file to actually *Config struct.

func ToRawYaml

func ToRawYaml(data interface{}) string

ToRawYaml writes the YAML encoding of v to the stream and returns the string written to stream.

Types

type AgentSidecar added in v0.0.38

type AgentSidecar struct {
	// Mode represents sidecar mode
	Mode string `yaml:"mode" json:"mode"`

	// WatchDir represents watch target directory for backup
	WatchDir string `yaml:"watch_dir" json:"watch_dir"`

	// WatchEnabled represent auto backup triggered by file changes is enabled or not
	WatchEnabled bool `yaml:"watch_enabled" json:"watch_enabled"`

	// AutoBackupEnabled represent auto backup triggered by timer is enabled or not
	AutoBackupEnabled bool `yaml:"auto_backup_enabled" json:"auto_backup_enabled"`

	// AutoBackupDuration represent checking loop duration for auto backup execution
	AutoBackupDuration string `yaml:"auto_backup_duration" json:"auto_backup_duration"`

	// PostStopTimeout represent timeout duration for file changing during post stop
	PostStopTimeout string `yaml:"post_stop_timeout" json:"post_stop_timeout"`

	// Filename represent backup filename
	Filename string `yaml:"filename" json:"filename"`

	// FilenameSuffix represent suffix of backup filename
	FilenameSuffix string `yaml:"filename_suffix" json:"filename_suffix"`

	// BlobStorage represent blob storage configurations
	BlobStorage *Blob `yaml:"blob_storage" json:"blob_storage"`

	// Compress represent compression configurations
	Compress *CompressCore `yaml:"compress" json:"compress"`

	// RestoreBackoffEnabled represent backoff enabled or not
	RestoreBackoffEnabled bool `yaml:"restore_backoff_enabled" json:"restore_backoff_enabled"`

	// RestoreBackoff represent backoff configurations for restoring process
	RestoreBackoff *Backoff `yaml:"restore_backoff" json:"restore_backoff"`

	// Client represent HTTP client configurations
	Client *Client `yaml:"client" json:"client"`
}

AgentSidecar represents the configuration for the agent sidecar.

func (*AgentSidecar) Bind added in v0.0.38

func (s *AgentSidecar) Bind() *AgentSidecar

Bind binds the actual data from the AgentSidecar receiver fields.

type Backoff

type Backoff struct {
	InitialDuration  string  `json:"initial_duration" yaml:"initial_duration"`
	BackoffTimeLimit string  `json:"backoff_time_limit" yaml:"backoff_time_limit"`
	MaximumDuration  string  `json:"maximum_duration" yaml:"maximum_duration"`
	JitterLimit      string  `json:"jitter_limit" yaml:"jitter_limit"`
	BackoffFactor    float64 `json:"backoff_factor" yaml:"backoff_factor"`
	RetryCount       int     `json:"retry_count" yaml:"retry_count"`
	EnableErrorLog   bool    `json:"enable_error_log" yaml:"enable_error_log"`
}

Backoff represents the configuration for the internal backoff package.

func (*Backoff) Bind

func (b *Backoff) Bind() *Backoff

Bind binds the actual data from the Backoff receiver fields.

func (*Backoff) Opts

func (b *Backoff) Opts() []backoff.Option

Opts creates and returns the slice with the functional options for the internal backoff package.

type BackupManager

type BackupManager struct {
	Client *GRPCClient `json:"client" yaml:"client"`
}

BackupManager represents the configuration for backup manager.

func (*BackupManager) Bind

func (b *BackupManager) Bind() *BackupManager

Bind binds the actual data from the BackupManager receiver fields.

type Blob added in v0.0.38

type Blob struct {
	// StorageType represents blob storaget type
	StorageType string `json:"storage_type" yaml:"storage_type"`

	// Bucket represents bucket name
	Bucket string `json:"bucket" yaml:"bucket"`

	// S3 represents S3 config
	S3 *S3Config `json:"s3" yaml:"s3"`

	// CloudStorage represents CloudStorage config
	CloudStorage *CloudStorageConfig `json:"cloud_storage" yaml:"cloud_storage"`
}

Blob represents Blob configuration.

func (*Blob) Bind added in v0.0.38

func (b *Blob) Bind() *Blob

Bind binds the actual data from the Blob receiver field.

type BlobStorageType added in v0.0.38

type BlobStorageType uint8

BlobStorageType represents blob storage type.

const (
	// S3 represents s3 storage type.
	S3 BlobStorageType = 1 + iota
	CloudStorage
)

func AtoBST added in v0.0.38

func AtoBST(bst string) BlobStorageType

AtoBST returns BlobStorageType converted from string.

func (BlobStorageType) String added in v0.0.38

func (bst BlobStorageType) String() string

String returns blob storage type.

type CallOption

type CallOption struct {
	WaitForReady          bool `json:"wait_for_ready" yaml:"wait_for_ready"`
	MaxRetryRPCBufferSize int  `json:"max_retry_rpc_buffer_size" yaml:"max_retry_rpc_buffer_size"`
	MaxRecvMsgSize        int  `json:"max_recv_msg_size" yaml:"max_recv_msg_size"`
	MaxSendMsgSize        int  `json:"max_send_msg_size" yaml:"max_send_msg_size"`
}

CallOption represents the configurations for call option.

func (*CallOption) Bind

func (c *CallOption) Bind() *CallOption

Bind binds the actual data from the CallOption receiver fields.

type Cassandra

type Cassandra struct {
	Hosts             []string `json:"hosts" yaml:"hosts"`
	CQLVersion        string   `json:"cql_version" yaml:"cql_version"`
	ProtoVersion      int      `json:"proto_version" yaml:"proto_version"`
	Timeout           string   `json:"timeout" yaml:"timeout"`
	ConnectTimeout    string   `json:"connect_timeout" yaml:"connect_timeout"`
	Port              int      `json:"port" yaml:"port"`
	Keyspace          string   `json:"keyspace" yaml:"keyspace"`
	NumConns          int      `json:"num_conns" yaml:"num_conns"`
	Consistency       string   `json:"consistency" yaml:"consistency"`
	SerialConsistency string   `json:"serial_consistency" yaml:"serial_consistency"`

	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`

	PoolConfig         *PoolConfig         `json:"pool_config" yaml:"pool_config"`
	RetryPolicy        *RetryPolicy        `json:"retry_policy" yaml:"retry_policy"`
	ReconnectionPolicy *ReconnectionPolicy `json:"reconnection_policy" yaml:"reconnection_policy"`
	HostFilter         *HostFilter         `json:"host_filter" yaml:"host_filter"`

	SocketKeepalive          string `json:"socket_keepalive" yaml:"socket_keepalive"`
	MaxPreparedStmts         int    `json:"max_prepared_stmts" yaml:"max_prepared_stmts"`
	MaxRoutingKeyInfo        int    `json:"max_routing_key_info" yaml:"max_routing_key_info"`
	PageSize                 int    `json:"page_size" yaml:"page_size"`
	TLS                      *TLS   `json:"tls" yaml:"tls"`
	Net                      *Net   `json:"net" yaml:"net"`
	EnableHostVerification   bool   `json:"enable_host_verification" yaml:"enable_host_verification"`
	DefaultTimestamp         bool   `json:"default_timestamp" yaml:"default_timestamp"`
	ReconnectInterval        string `json:"reconnect_interval" yaml:"reconnect_interval"`
	MaxWaitSchemaAgreement   string `json:"max_wait_schema_agreement" yaml:"max_wait_schema_agreement"`
	IgnorePeerAddr           bool   `json:"ignore_peer_addr" yaml:"ignore_peer_addr"`
	DisableInitialHostLookup bool   `json:"disable_initial_host_lookup" yaml:"disable_initial_host_lookup"`
	DisableNodeStatusEvents  bool   `json:"disable_node_status_events" yaml:"disable_node_status_events"`
	DisableTopologyEvents    bool   `json:"disable_topology_events" yaml:"disable_topology_events"`
	DisableSchemaEvents      bool   `json:"disable_schema_events" yaml:"disable_schema_events"`
	DisableSkipMetadata      bool   `json:"disable_skip_metadata" yaml:"disable_skip_metadata"`
	DefaultIdempotence       bool   `json:"default_idempotence" yaml:"default_idempotence"`
	WriteCoalesceWaitTime    string `json:"write_coalesce_wait_time" yaml:"write_coalesce_wait_time"`

	// meta
	KVTable string `json:"kv_table" yaml:"kv_table"`
	VKTable string `json:"vk_table" yaml:"vk_table"`

	// backup manager
	VectorBackupTable string `json:"vector_backup_table" yaml:"vector_backup_table"`
}

Cassandra represents the configuration for the internal cassandra package.

func (*Cassandra) Bind

func (c *Cassandra) Bind() *Cassandra

Bind binds the actual data from the Cassandra receiver fields.

func (*Cassandra) Opts

func (cfg *Cassandra) Opts() (opts []cassandra.Option, err error)

Opts creates and returns the slice with the functional options for the internal cassandra package. In addition, Opts sometimes returns the error when the any errors are occurred.

type Client

type Client struct {
	Net       *Net       `json:"net" yaml:"net"`
	Transport *Transport `json:"transport" yaml:"transport"`
}

Client represents the Client configurations.

func (*Client) Bind

func (c *Client) Bind() *Client

Bind binds the actual data from the Client receiver field.

type CloudStorageClient added in v1.1.0

type CloudStorageClient struct {
	CredentialsFilePath string `json:"credentials_file_path" yaml:"credentials_file_path"`
	CredentialsJSON     string `json:"credentials_json" yaml:"credentials_json"`
}

CloudStorageClient represents CloudStorage client configuration.

type CloudStorageConfig added in v1.1.0

type CloudStorageConfig struct {
	URL    string              `json:"url" yaml:"url"`
	Client *CloudStorageClient `json:"client" yaml:"client"`

	WriteBufferSize         int    `json:"write_buffer_size" yaml:"write_buffer_size"`
	WriteCacheControl       string `json:"write_cache_control" yaml:"write_cache_control"`
	WriteContentDisposition string `json:"write_content_disposition" yaml:"write_content_disposition"`
	WriteContentEncoding    string `json:"write_content_encoding" yaml:"write_content_encoding"`
	WriteContentLanguage    string `json:"write_content_language" yaml:"write_content_language"`
	WriteContentType        string `json:"write_content_type" yaml:"write_content_type"`
}

CloudStorageConfig represents CloudStorage configuration.

func (*CloudStorageConfig) Bind added in v1.1.0

type Collector added in v0.0.19

type Collector struct {
	Duration string   `json:"duration" yaml:"duration"`
	Metrics  *Metrics `json:"metrics" yaml:"metrics"`
}

Collector represents the configuration for the collector.

func (*Collector) Bind added in v0.0.42

func (c *Collector) Bind() *Collector

Bind binds the actual data from the Collector receiver fields.

type CompressCore added in v0.0.38

type CompressCore struct {
	// CompressorAlgorithm represents compression algorithm type
	CompressAlgorithm string `json:"compress_algorithm" yaml:"compress_algorithm"`

	// CompressionLevel represents compression level
	CompressionLevel int `json:"compression_level" yaml:"compression_level"`
}

CompressCore represents CompressCore configuration.

func (*CompressCore) Bind added in v0.0.38

func (c *CompressCore) Bind() *CompressCore

Bind binds the actual data from the receiver field.

type Compressor

type Compressor struct {
	CompressCore `json:",inline" yaml:",inline"`

	// ConcurrentLimit represents limitation of compression worker concurrency
	ConcurrentLimit int `json:"concurrent_limit" yaml:"concurrent_limit"`

	// QueueCheckDuration represents duration of queue daemon block
	QueueCheckDuration string `json:"queue_check_duration" yaml:"queue_check_duration"`
}

Compressor represents Compressor configuration.

func (*Compressor) Bind

func (c *Compressor) Bind() *Compressor

Bind binds the actual data from the Compressor receiver field.

type CompressorRegisterer added in v0.0.28

type CompressorRegisterer struct {
	// ConcurrentLimit represents limitation of worker
	ConcurrentLimit int `json:"concurrent_limit" yaml:"concurrent_limit"`

	// QueueCheckDuration represents duration of queue daemon block
	QueueCheckDuration string `json:"queue_check_duration" yaml:"queue_check_duration"`

	// Compressor represents gRPC client config of compressor client (for forwarding use)
	Compressor *BackupManager `json:"compressor" yaml:"compressor"`
}

CompressorRegisterer represents CompressorRegisterer configuration.

func (*CompressorRegisterer) Bind added in v0.0.28

Bind binds the actual data from the CompressorRegisterer receiver field.

type ConnectionPool added in v0.0.27

type ConnectionPool struct {
	ResolveDNS           bool   `json:"enable_dns_resolver" yaml:"enable_dns_resolver"`
	EnableRebalance      bool   `json:"enable_rebalance" yaml:"enable_rebalance"`
	RebalanceDuration    string `json:"rebalance_duration" yaml:"rebalance_duration"`
	Size                 int    `json:"size" yaml:"size"`
	OldConnCloseDuration string `json:"old_conn_close_duration" yaml:"old_conn_close_duration"`
}

ConnectionPool represents the configurations for connection pool.

type DNS

type DNS struct {
	CacheEnabled    bool   `yaml:"cache_enabled" json:"cache_enabled,omitempty"`
	RefreshDuration string `yaml:"refresh_duration" json:"refresh_duration,omitempty"`
	CacheExpiration string `yaml:"cache_expiration" json:"cache_expiration,omitempty"`
}

DNS represents the configuration for resolving DNS.

func (*DNS) Bind

func (d *DNS) Bind() *DNS

Bind binds the actual data from the DNS fields.

type DialOption

type DialOption struct {
	WriteBufferSize             int                  `json:"write_buffer_size" yaml:"write_buffer_size"`
	ReadBufferSize              int                  `json:"read_buffer_size" yaml:"read_buffer_size"`
	InitialWindowSize           int                  `json:"initial_window_size" yaml:"initial_window_size"`
	InitialConnectionWindowSize int                  `json:"initial_connection_window_size" yaml:"initial_connection_window_size"`
	MaxMsgSize                  int                  `json:"max_msg_size" yaml:"max_msg_size"`
	BackoffMaxDelay             string               `json:"backoff_max_delay" yaml:"backoff_max_delay"`
	BackoffBaseDelay            string               `json:"backoff_base_delay" yaml:"backoff_base_delay"`
	BackoffJitter               float64              `json:"backoff_jitter" yaml:"backoff_jitter"`
	BackoffMultiplier           float64              `json:"backoff_multiplier" yaml:"backoff_multiplier"`
	MinimumConnectionTimeout    string               `json:"min_connection_timeout" yaml:"min_connection_timeout"`
	EnableBackoff               bool                 `json:"enable_backoff" yaml:"enable_backoff"`
	Insecure                    bool                 `json:"insecure" yaml:"insecure"`
	Timeout                     string               `json:"timeout" yaml:"timeout"`
	Net                         *Net                 `json:"net" yaml:"net"`
	KeepAlive                   *GRPCClientKeepalive `json:"keep_alive" yaml:"keep_alive"`
}

DialOption represents the configurations for dial option.

func (*DialOption) Bind

func (d *DialOption) Bind() *DialOption

Bind binds the actual data from the DialOption receiver fields.

type Dialer

type Dialer struct {
	Timeout          string `yaml:"timeout" json:"timeout,omitempty"`
	KeepAlive        string `yaml:"keep_alive" json:"keep_alive,omitempty"`
	FallbackDelay    string `yaml:"fallback_delay" json:"fallback_delay,omitempty"`
	DualStackEnabled bool   `yaml:"dual_stack_enabled" json:"dual_stack_enabled,omitempty"`
}

Dialer represents the configuration for dial.

func (*Dialer) Bind

func (d *Dialer) Bind() *Dialer

Bind binds the actual data from the Dialer fields.

type Discoverer

type Discoverer struct {
	Name              string `json:"name" yaml:"name"`
	Namespace         string `json:"namespace" yaml:"namespace"`
	DiscoveryDuration string `json:"discovery_duration" yaml:"discovery_duration"`
	Net               *Net   `json:"net" yaml:"net"`
}

Discoverer represents the Discoverer configurations.

func (*Discoverer) Bind

func (d *Discoverer) Bind() *Discoverer

Bind binds the actual data from the Discoverer receiver field.

type DiscovererClient added in v0.0.5

type DiscovererClient struct {
	Duration           string      `json:"duration" yaml:"duration"`
	Client             *GRPCClient `json:"client" yaml:"client"`
	AgentClientOptions *GRPCClient `json:"agent_client_options" yaml:"agent_client_options"`
}

DiscovererClient represents the DiscovererClient configurations.

func (*DiscovererClient) Bind added in v0.0.5

Bind binds the actual data from the DiscovererClient receiver field.

type EgressFilter

type EgressFilter struct {
	Client          *GRPCClient `json:"client,omitempty" yaml:"client"`
	DistanceFilters []string    `json:"distance_filters,omitempty" yaml:"distance_filters"`
	ObjectFilters   []string    `json:"object_filters,omitempty" yaml:"object_filters"`
}

EgressFilter represents the EgressFilter configuration.

func (*EgressFilter) Bind

func (e *EgressFilter) Bind() *EgressFilter

Bind binds the actual data from the EgressFilter receiver field.

type GRPC

type GRPC struct {
	BidirectionalStreamConcurrency int            `json:"bidirectional_stream_concurrency,omitempty" yaml:"bidirectional_stream_concurrency"`
	MaxReceiveMessageSize          int            `json:"max_receive_message_size,omitempty" yaml:"max_receive_message_size"`
	MaxSendMessageSize             int            `json:"max_send_message_size,omitempty" yaml:"max_send_message_size"`
	InitialWindowSize              int            `json:"initial_window_size,omitempty" yaml:"initial_window_size"`
	InitialConnWindowSize          int            `json:"initial_conn_window_size,omitempty" yaml:"initial_conn_window_size"`
	Keepalive                      *GRPCKeepalive `json:"keepalive,omitempty" yaml:"keepalive"`
	WriteBufferSize                int            `json:"write_buffer_size,omitempty" yaml:"write_buffer_size"`
	ReadBufferSize                 int            `json:"read_buffer_size,omitempty" yaml:"read_buffer_size"`
	ConnectionTimeout              string         `json:"connection_timeout,omitempty" yaml:"connection_timeout"`
	MaxHeaderListSize              int            `json:"max_header_list_size,omitempty" yaml:"max_header_list_size"`
	HeaderTableSize                int            `json:"header_table_size,omitempty" yaml:"header_table_size"`
	Interceptors                   []string       `json:"interceptors,omitempty" yaml:"interceptors"`
	EnableReflection               bool           `json:"enable_reflection,omitempty" yaml:"enable_reflection"`
}

GRPC represents the configuration for gPRC.

func (*GRPC) Bind

func (g *GRPC) Bind() *GRPC

Bind binds the actual value from the GRPC struct field.

type GRPCClient

type GRPCClient struct {
	Addrs               []string        `json:"addrs" yaml:"addrs"`
	HealthCheckDuration string          `json:"health_check_duration" yaml:"health_check_duration"`
	ConnectionPool      *ConnectionPool `json:"connection_pool" yaml:"connection_pool"`
	Backoff             *Backoff        `json:"backoff" yaml:"backoff"`
	CallOption          *CallOption     `json:"call_option" yaml:"call_option"`
	DialOption          *DialOption     `json:"dial_option" yaml:"dial_option"`
	TLS                 *TLS            `json:"tls" yaml:"tls"`
}

GRPCClient represents the configurations for gRPC client.

func (*GRPCClient) Bind

func (g *GRPCClient) Bind() *GRPCClient

Bind binds the actual data from the GRPCClient receiver fields.

func (*GRPCClient) Opts

func (g *GRPCClient) Opts() ([]grpc.Option, error)

Opts creates the slice with the functional options for the gRPC options.

type GRPCClientKeepalive

type GRPCClientKeepalive struct {
	Time                string `json:"time" yaml:"time"`
	Timeout             string `json:"timeout" yaml:"timeout"`
	PermitWithoutStream bool   `json:"permit_without_stream" yaml:"permit_without_stream"`
}

GRPCClientKeepalive represents the configurations for gRPC keep-alive.

func (*GRPCClientKeepalive) Bind

Bind binds the actual data from the GRPCClientKeepalive receiver fields.

type GRPCKeepalive

type GRPCKeepalive struct {
	MaxConnIdle     string `json:"max_conn_idle" yaml:"max_conn_idle"`
	MaxConnAge      string `json:"max_conn_age" yaml:"max_conn_age"`
	MaxConnAgeGrace string `json:"max_conn_age_grace" yaml:"max_conn_age_grace"`
	Time            string `json:"time" yaml:"time"`
	Timeout         string `json:"timeout" yaml:"timeout"`
}

GRPCKeepalive represents the configuration for gRPC keep-alive.

func (*GRPCKeepalive) Bind

func (k *GRPCKeepalive) Bind() *GRPCKeepalive

Bind binds the actual value from the GRPCKeepalive struct field.

type Gateway

type Gateway struct {
	// AgentPort represent agent port number
	AgentPort int `json:"agent_port" yaml:"agent_port"`

	// AgentName represent agents meta_name for service discovery
	AgentName string `json:"agent_name" yaml:"agent_name"`

	// AgentNamespace represent agent namespace location
	AgentNamespace string `json:"agent_namespace" yaml:"agent_namespace"`

	// AgentDNS represent agents dns A record for service discovery
	AgentDNS string `json:"agent_dns" yaml:"agent_dns"`

	// NodeName represents node name
	NodeName string `json:"node_name" yaml:"node_name"`

	// IndexReplica represents index replication count
	IndexReplica int `json:"index_replica" yaml:"index_replica"`

	// Discoverer represent agent discoverer service configuration
	Discoverer *DiscovererClient `json:"discoverer" yaml:"discoverer"`

	// Meta represent meta data service configuration
	Meta *Meta `json:"meta" yaml:"meta"`

	// BackupManager represent backup manager configuration
	BackupManager *BackupManager `json:"backup" yaml:"backup"`

	// EgressFilter represents egress filter configuration
	EgressFilter *EgressFilter `json:"egress_filter" yaml:"egress_filter"`
}

Gateway represents the list of configurations for gateway.

func (*Gateway) Bind

func (g *Gateway) Bind() *Gateway

Bind binds the actual data from the Gateway receiver field on the Gateway.

type GlobalConfig added in v0.0.2

type GlobalConfig struct {
	// Version represent configuration file version.
	Version string `json:"version" yaml:"version"`

	// TZ represent system time location .
	TZ string `json:"time_zone" yaml:"time_zone"`

	// Log represent log configuration.
	Logging *Logging `json:"logging,omitempty" yaml:"logging,omitempty"`
}

GlobalConfig represent a application setting data content (config.yaml).

func (*GlobalConfig) Bind added in v0.0.2

func (c *GlobalConfig) Bind() *GlobalConfig

Bind binds the actual data from the receiver field.

type HTTP

type HTTP struct {
	ShutdownDuration  string `json:"shutdown_duration" yaml:"shutdown_duration"`
	HandlerTimeout    string `json:"handler_timeout" yaml:"handler_timeout"`
	IdleTimeout       string `json:"idle_timeout" yaml:"idle_timeout"`
	ReadHeaderTimeout string `json:"read_header_timeout" yaml:"read_header_timeout"`
	ReadTimeout       string `json:"read_timeout" yaml:"read_timeout"`
	WriteTimeout      string `json:"write_timeout" yaml:"write_timeout"`
}

HTTP represents the configuration for HTTP.

func (*HTTP) Bind

func (h *HTTP) Bind() *HTTP

Bind binds the actual value from the HTTP struct field.

type HostFilter added in v0.0.34

type HostFilter struct {
	Enabled    bool     `json:"enabled"`
	DataCenter string   `json:"data_center" yaml:"data_center"`
	WhiteList  []string `json:"white_list" yaml:"white_list"`
}

HostFilter represents the configuration for the host filter.

type Indexer added in v0.0.5

type Indexer struct {
	// AgentPort represent agent port number
	AgentPort int `json:"agent_port" yaml:"agent_port"`

	// AgentName represent agents meta_name for service discovery
	AgentName string `json:"agent_name" yaml:"agent_name"`

	// AgentNamespace represent agent namespace location
	AgentNamespace string `json:"agent_namespace" yaml:"agent_namespace"`

	// AgentDNS represent agents dns A record for service discovery
	AgentDNS string `json:"agent_dns" yaml:"agent_dns"`

	// Concurrency represents indexing concurrency
	Concurrency int `json:"concurrency" yaml:"concurrency"`

	// AutoIndexDurationLimit represents auto indexing duration limit
	AutoIndexDurationLimit string `yaml:"auto_index_duration_limit" json:"auto_index_duration_limit"`

	// AutoIndexCheckDuration represent checking loop duration about auto indexing execution
	AutoIndexCheckDuration string `yaml:"auto_index_check_duration" json:"auto_index_check_duration"`

	// AutoIndexLength represent minimum auto index length
	AutoIndexLength uint32 `yaml:"auto_index_length" json:"auto_index_length"`

	// CreationPoolSize represent create index batch pool size
	CreationPoolSize uint32 `yaml:"creation_pool_size" json:"creation_pool_size"`

	// NodeName represents node name
	NodeName string `json:"node_name" yaml:"node_name"`

	// Discoverer represent agent discoverer service configuration
	Discoverer *DiscovererClient `json:"discoverer" yaml:"discoverer"`
}

Indexer represents the Indexer configurations.

func (*Indexer) Bind added in v0.0.5

func (im *Indexer) Bind() *Indexer

Bind binds the actual data from the Indexer receiver field.

type IngressFilter added in v1.0.0

type IngressFilter struct {
	Client        *GRPCClient `json:"client,omitempty" yaml:"client"`
	Vectorizer    string      `json:"vectorizer,omitempty" yaml:"vectorizer"`
	SearchFilters []string    `json:"search_filters,omitempty" yaml:"search_filters"`
	InsertFilters []string    `json:"insert_filters,omitempty" yaml:"insert_filters"`
	UpdateFilters []string    `json:"update_filters,omitempty" yaml:"update_filters"`
	UpsertFilters []string    `json:"upsert_filters,omitempty" yaml:"upsert_filters"`
}

IngressFilter represents the IngressFilter configuration.

func (*IngressFilter) Bind added in v1.0.0

func (i *IngressFilter) Bind() *IngressFilter

Bind binds the actual data from the IngressFilter receiver field.

type Jaeger added in v0.0.19

type Jaeger struct {
	Enabled bool `json:"enabled" yaml:"enabled"`

	CollectorEndpoint string `json:"collector_endpoint" yaml:"collector_endpoint"`
	AgentEndpoint     string `json:"agent_endpoint" yaml:"agent_endpoint"`

	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`

	ServiceName string `json:"service_name" yaml:"service_name"`

	BufferMaxCount int `json:"buffer_max_count" yaml:"buffer_max_count"`
}

Jaeger represents the configuration for the jaeger.

type LB added in v1.0.0

type LB struct {
	// AgentPort represent agent port number
	AgentPort int `json:"agent_port" yaml:"agent_port"`

	// AgentName represent agents meta_name for service discovery
	AgentName string `json:"agent_name" yaml:"agent_name"`

	// AgentNamespace represent agent namespace location
	AgentNamespace string `json:"agent_namespace" yaml:"agent_namespace"`

	// AgentDNS represent agents dns A record for service discovery
	AgentDNS string `json:"agent_dns" yaml:"agent_dns"`

	// NodeName represents node name
	NodeName string `json:"node_name" yaml:"node_name"`

	// IndexReplica represents index replication count
	IndexReplica int `json:"index_replica" yaml:"index_replica"`

	// Discoverer represent agent discoverer service configuration
	Discoverer *DiscovererClient `json:"discoverer" yaml:"discoverer"`
}

LB represents the configuration for load balancer.

func (*LB) Bind added in v1.0.0

func (g *LB) Bind() *LB

Bind binds the actual data from the LB receiver fields.

type Logging added in v0.0.2

type Logging struct {
	Logger string `json:"logger" yaml:"logger"`
	Level  string `json:"level" yaml:"level"`
	Format string `json:"format" yaml:"format"`
}

Logging represents Logging configuration.

func (*Logging) Bind added in v0.0.2

func (l *Logging) Bind() *Logging

Bind returns Logging object whose every value is field value or envirionment value.

type Meta

type Meta struct {
	Host                      string      `json:"host" yaml:"host"`
	Port                      uint16      `json:"port" yaml:"port"`
	Client                    *GRPCClient `json:"client" yaml:"client"`
	EnableCache               bool        `json:"enable_cache" yaml:"enable_cache"`
	CacheExpiration           string      `json:"cache_expiration" yaml:"cache_expiration"`
	ExpiredCacheCheckDuration string      `json:"expired_cache_check_duration" yaml:"expired_cache_check_duration"`
}

Meta represents the configurations for vald meta.

func (*Meta) Bind

func (m *Meta) Bind() *Meta

Bind binds the actual data from Meta receiver fields.

type Metrics added in v0.0.19

type Metrics struct {
	EnableVersionInfo bool     `json:"enable_version_info" yaml:"enable_version_info"`
	VersionInfoLabels []string `json:"version_info_labels" yaml:"version_info_labels"`
	EnableMemory      bool     `json:"enable_memory" yaml:"enable_memory"`
	EnableGoroutine   bool     `json:"enable_goroutine" yaml:"enable_goroutine"`
	EnableCGO         bool     `json:"enable_cgo" yaml:"enable_cgo"`
}

Metrics represents the configuration for the metrics.

type MySQL

type MySQL struct {
	DB                   string `json:"db" yaml:"db"`
	Network              string `json:"network" yaml:"network"`
	SocketPath           string `json:"socket_path" yaml:"socket_path"`
	Host                 string `json:"host" yaml:"host"`
	Port                 uint16 `json:"port" yaml:"port"`
	User                 string `json:"user" yaml:"user"`
	Pass                 string `json:"pass" yaml:"pass"`
	Name                 string `json:"name" yaml:"name"`
	Charset              string `json:"charset" yaml:"charset"`
	Timezone             string `json:"timezone" yaml:"timezone"`
	InitialPingTimeLimit string `json:"initial_ping_time_limit" yaml:"initial_ping_time_limit"`
	InitialPingDuration  string `json:"initial_ping_duration" yaml:"initial_ping_duration"`
	ConnMaxLifeTime      string `json:"conn_max_life_time" yaml:"conn_max_life_time"`
	MaxOpenConns         int    `json:"max_open_conns" yaml:"max_open_conns"`
	MaxIdleConns         int    `json:"max_idle_conns" yaml:"max_idle_conns"`
	TLS                  *TLS   `json:"tls" yaml:"tls"`
	Net                  *Net   `json:"net" yaml:"net"`
}

MySQL represent the mysql configuration.

func (*MySQL) Bind

func (m *MySQL) Bind() *MySQL

Bind returns MySQL object whose some string value is filed value or environment value.

func (*MySQL) Opts added in v0.0.51

func (m *MySQL) Opts() ([]mysql.Option, error)

Opts creates and returns the slice with the functional options for the internal mysql package. When any errors occur, Opts returns the no functional options and the errors.

type NGT

type NGT struct {
	// IndexPath represent the ngt index file path
	IndexPath string `yaml:"index_path" json:"index_path,omitempty"`

	// Dimension represent the ngt index dimension
	Dimension int `yaml:"dimension" json:"dimension,omitempty" info:"dimension"`

	// BulkInsertChunkSize represent the bulk insert chunk size
	BulkInsertChunkSize int `yaml:"bulk_insert_chunk_size" json:"bulk_insert_chunk_size,omitempty"`

	// DistanceType represent the ngt index distance type
	DistanceType string `yaml:"distance_type" json:"distance_type,omitempty" info:"distance_type"`

	// ObjectType represent the ngt index object type float or int
	ObjectType string `yaml:"object_type" json:"object_type,omitempty" info:"object_type"`

	// CreationEdgeSize represent the index edge count
	CreationEdgeSize int `yaml:"creation_edge_size" json:"creation_edge_size,omitempty"`

	// SearchEdgeSize represent the search edge size
	SearchEdgeSize int `yaml:"search_edge_size" json:"search_edge_size,omitempty"`

	// AutoIndexDurationLimit represents auto indexing duration limit
	AutoIndexDurationLimit string `yaml:"auto_index_duration_limit" json:"auto_index_duration_limit,omitempty"`

	// AutoIndexCheckDuration represent checking loop duration about auto indexing execution
	AutoIndexCheckDuration string `yaml:"auto_index_check_duration" json:"auto_index_check_duration,omitempty"`

	// AutoSaveIndexDuration represent checking loop duration about auto save index execution
	AutoSaveIndexDuration string `yaml:"auto_save_index_duration" json:"auto_save_index_duration,omitempty"`

	// AutoIndexLength represent auto index length limit
	AutoIndexLength int `yaml:"auto_index_length" json:"auto_index_length,omitempty"`

	// InitialDelayMaxDuration represent maximum duration for initial delay
	InitialDelayMaxDuration string `yaml:"initial_delay_max_duration" json:"initial_delay_max_duration,omitempty"`

	// EnableInMemoryMode enables on memory ngt indexing mode
	EnableInMemoryMode bool `yaml:"enable_in_memory_mode" json:"enable_in_memory_mode,omitempty"`

	// DefaultPoolSize represent default create index batch pool size
	DefaultPoolSize uint32 `yaml:"default_pool_size" json:"default_pool_size,omitempty"`

	// DefaultRadius represent default radius used for search
	DefaultRadius float32 `yaml:"default_radius" json:"default_radius,omitempty"`

	// DefaultEpsilon represent default epsilon used for search
	DefaultEpsilon float32 `yaml:"default_epsilon" json:"default_epsilon,omitempty"`

	// MinLoadIndexTimeout represents minimum duration of load index timeout
	MinLoadIndexTimeout string `yaml:"min_load_index_timeout" json:"min_load_index_timeout,omitempty"`

	// MaxLoadIndexTimeout represents maximum duration of load index timeout
	MaxLoadIndexTimeout string `yaml:"max_load_index_timeout" json:"max_load_index_timeout,omitempty"`

	// LoadIndexTimeoutFactor represents a factor of load index timeout
	LoadIndexTimeoutFactor string `yaml:"load_index_timeout_factor" json:"load_index_timeout_factor,omitempty"`

	// EnableProactiveGC enables more proactive GC call for reducing heap memory allocation
	EnableProactiveGC bool `yaml:"enable_proactive_gc" json:"enable_proactive_gc,omitempty"`

	// VQueue represent the ngt vector queue buffer size
	VQueue *VQueue `json:"vqueue,omitempty" yaml:"vqueue"`
}

NGT represent the ngt core configuration for server.

func (*NGT) Bind

func (n *NGT) Bind() *NGT

Bind returns NGT object whose some string value is filed value or environment value.

type Net added in v1.0.3

type Net struct {
	DNS          *DNS          `yaml:"dns" json:"dns,omitempty"`
	Dialer       *Dialer       `yaml:"dialer" json:"dialer,omitempty"`
	SocketOption *SocketOption `json:"socket_option,omitempty" yaml:"socket_option"`
	TLS          *TLS          `yaml:"tls" json:"tls,omitempty"`
}

Net represents the network configuration tcp, udp, unix domain socket.

func (*Net) Bind added in v1.0.3

func (t *Net) Bind() *Net

Bind binds the actual data from the Net fields.

func (*Net) Opts added in v1.0.3

func (t *Net) Opts() ([]net.DialerOption, error)

Opts creates the slice with the functional options for the net.Dialer options.

type Observability added in v0.0.19

type Observability struct {
	Enabled     bool         `json:"enabled" yaml:"enabled"`
	Collector   *Collector   `json:"collector" yaml:"collector"`
	Trace       *Trace       `json:"trace" yaml:"trace"`
	Prometheus  *Prometheus  `json:"prometheus" yaml:"prometheus"`
	Jaeger      *Jaeger      `json:"jaeger" yaml:"jaeger"`
	Stackdriver *Stackdriver `json:"stackdriver" yaml:"stackdriver"`
}

Observability represents the configuration for the observability.

func (*Observability) Bind added in v0.0.19

func (o *Observability) Bind() *Observability

Bind binds the actual data from the Observability receiver fields.

type OutputSpec added in v1.1.0

type OutputSpec struct {
	OperationName string `json:"operation_name,omitempty" yaml:"operation_name"`
	OutputIndex   int    `json:"output_index,omitempty" yaml:"output_index"`
}

func (*OutputSpec) Bind added in v1.1.0

func (o *OutputSpec) Bind() *OutputSpec

type PoolConfig

type PoolConfig struct {
	DataCenter               string `json:"data_center" yaml:"data_center"`
	DCAwareRouting           bool   `json:"dc_aware_routing" yaml:"dc_aware_routing"`
	NonLocalReplicasFallback bool   `json:"non_local_replicas_fallback" yaml:"non_local_replicas_fallback"`
	ShuffleReplicas          bool   `json:"shuffle_replicas" yaml:"shuffle_replicas"`
	TokenAwareHostPolicy     bool   `json:"token_aware_host_policy" yaml:"token_aware_host_policy"`
}

PoolConfig represents the configuration for the pool config.

type Prometheus added in v0.0.19

type Prometheus struct {
	Enabled   bool   `json:"enabled" yaml:"enabled"`
	Endpoint  string `json:"endpoint" yaml:"endpoint"`
	Namespace string `json:"namespace" yaml:"namespace"`
}

Prometheus represents the configuration for the prometheus.

type ReconnectionPolicy

type ReconnectionPolicy struct {
	MaxRetries      int    `json:"max_retries" yaml:"max_retries"`
	InitialInterval string `json:"initial_interval" yaml:"initial_interval"`
}

ReconnectionPolicy represents the configuration for the reconnection policy.

type Redis

type Redis struct {
	Addrs                []string `json:"addrs,omitempty" yaml:"addrs"`
	DB                   int      `json:"db,omitempty" yaml:"db"`
	DialTimeout          string   `json:"dial_timeout,omitempty" yaml:"dial_timeout"`
	IdleCheckFrequency   string   `json:"idle_check_frequency,omitempty" yaml:"idle_check_frequency"`
	IdleTimeout          string   `json:"idle_timeout,omitempty" yaml:"idle_timeout"`
	InitialPingDuration  string   `json:"initial_ping_duration,omitempty" yaml:"initial_ping_duration"`
	InitialPingTimeLimit string   `json:"initial_ping_time_limit,omitempty" yaml:"initial_ping_time_limit"`
	KVPrefix             string   `json:"kv_prefix,omitempty" yaml:"kv_prefix"`
	KeyPref              string   `json:"key_pref,omitempty" yaml:"key_pref"`
	MaxConnAge           string   `json:"max_conn_age,omitempty" yaml:"max_conn_age"`
	MaxRedirects         int      `json:"max_redirects,omitempty" yaml:"max_redirects"`
	MaxRetries           int      `json:"max_retries,omitempty" yaml:"max_retries"`
	MaxRetryBackoff      string   `json:"max_retry_backoff,omitempty" yaml:"max_retry_backoff"`
	MinIdleConns         int      `json:"min_idle_conns,omitempty" yaml:"min_idle_conns"`
	MinRetryBackoff      string   `json:"min_retry_backoff,omitempty" yaml:"min_retry_backoff"`
	Network              string   `json:"network,omitempty" yaml:"network"`
	Password             string   `json:"password,omitempty" yaml:"password"`
	PoolSize             int      `json:"pool_size,omitempty" yaml:"pool_size"`
	PoolTimeout          string   `json:"pool_timeout,omitempty" yaml:"pool_timeout"`
	PrefixDelimiter      string   `json:"prefix_delimiter,omitempty" yaml:"prefix_delimiter"`
	ReadOnly             bool     `json:"read_only,omitempty" yaml:"read_only"`
	ReadTimeout          string   `json:"read_timeout,omitempty" yaml:"read_timeout"`
	RouteByLatency       bool     `json:"route_by_latency,omitempty" yaml:"route_by_latency"`
	RouteRandomly        bool     `json:"route_randomly,omitempty" yaml:"route_randomly"`
	SentinelPassword     string   `json:"sentinel_password,omitempty"`
	SentinelMasterName   string   `json:"sentinel_master_name,omitempty"`
	Net                  *Net     `json:"tcp,omitempty" yaml:"net"`
	TLS                  *TLS     `json:"tls,omitempty" yaml:"tls"`
	Username             string   `json:"username,omitempty" yaml:"username"`
	VKPrefix             string   `json:"vk_prefix,omitempty" yaml:"vk_prefix"`
	WriteTimeout         string   `json:"write_timeout,omitempty" yaml:"write_timeout"`
}

Redis represents the configuration for redis cluster.

func (*Redis) Bind

func (r *Redis) Bind() *Redis

Bind binds the actual data from the Redis receiver fields.

func (*Redis) Opts added in v0.0.51

func (r *Redis) Opts() (opts []redis.Option, err error)

Opts creates the functional option list from the Redis. If the error occurs, it will return no functional options and the error.

type RetryPolicy

type RetryPolicy struct {
	NumRetries  int    `json:"num_retries" yaml:"num_retries"`
	MinDuration string `json:"min_duration" yaml:"min_duration"`
	MaxDuration string `json:"max_duration" yaml:"max_duration"`
}

RetryPolicy represents the configuration for the retry policy.

type RoundTripper

type RoundTripper struct {
	TLSHandshakeTimeout   string `yaml:"tls_handshake_timeout" json:"tls_handshake_timeout"`
	MaxIdleConns          int    `yaml:"max_idle_conns" json:"max_idle_conns"`
	MaxIdleConnsPerHost   int    `yaml:"max_idle_conns_per_host" json:"max_idle_conns_per_host"`
	MaxConnsPerHost       int    `yaml:"max_conns_per_host" json:"max_conns_per_host"`
	IdleConnTimeout       string `yaml:"idle_conn_timeout" json:"idle_conn_timeout"`
	ResponseHeaderTimeout string `yaml:"response_header_timeout" json:"response_header_timeout"`
	ExpectContinueTimeout string `yaml:"expect_continue_timeout" json:"expect_continue_timeout"`
	MaxResponseHeaderSize int64  `yaml:"max_response_header_size" json:"max_response_header_size"`
	WriteBufferSize       int64  `yaml:"write_buffer_size" json:"write_buffer_size"`
	ReadBufferSize        int64  `yaml:"read_buffer_size" json:"read_buffer_size"`
	ForceAttemptHTTP2     bool   `yaml:"force_attempt_http_2" json:"force_attempt_http_2"`
}

RoundTripper represents the round trip configuration for transport.

func (*RoundTripper) Bind

func (r *RoundTripper) Bind() *RoundTripper

Bind binds the actual data from the RoundTripper receiver fields.

type S3Config added in v0.0.38

type S3Config struct {
	Endpoint        string `json:"endpoint" yaml:"endpoint"`
	Region          string `json:"region" yaml:"region"`
	AccessKey       string `json:"access_key" yaml:"access_key"`
	SecretAccessKey string `json:"secret_access_key" yaml:"secret_access_key"`
	Token           string `json:"token" yaml:"token"`

	MaxRetries                 int  `json:"max_retries" yaml:"max_retries"`
	ForcePathStyle             bool `json:"force_path_style" yaml:"force_path_style"`
	UseAccelerate              bool `json:"use_accelerate" yaml:"use_accelerate"`
	UseARNRegion               bool `json:"use_arn_region" yaml:"use_arn_region"`
	UseDualStack               bool `json:"use_dual_stack" yaml:"use_dual_stack"`
	EnableSSL                  bool `json:"enable_ssl" yaml:"enable_ssl"`
	EnableParamValidation      bool `json:"enable_param_validation" yaml:"enable_param_validation"`
	Enable100Continue          bool `json:"enable_100_continue" yaml:"enable_100_continue"`
	EnableContentMD5Validation bool `json:"enable_content_md5_validation" yaml:"enable_content_md5_validation"`
	EnableEndpointDiscovery    bool `json:"enable_endpoint_discovery" yaml:"enable_endpoint_discovery"`
	EnableEndpointHostPrefix   bool `json:"enable_endpoint_host_prefix" yaml:"enable_endpoint_host_prefix"`

	MaxPartSize  string `json:"max_part_size" yaml:"max_part_size"`
	MaxChunkSize string `json:"max_chunk_size" yaml:"max_chunk_size"`
}

S3Config represents S3Config configuration.

func (*S3Config) Bind added in v0.0.38

func (s *S3Config) Bind() *S3Config

Bind binds the actual data from the S3Config receiver field.

type Server

type Server struct {
	Name          string        `json:"name,omitempty" yaml:"name"`
	Network       string        `json:"network,omitempty" yaml:"network"`
	Host          string        `json:"host,omitempty" yaml:"host"`
	Port          uint16        `json:"port,omitempty" yaml:"port"`
	SocketPath    string        `json:"socket_path,omitempty" yaml:"socket_path"`
	Mode          string        `json:"mode,omitempty" yaml:"mode"` // gRPC, REST, GraphQL
	ProbeWaitTime string        `json:"probe_wait_time,omitempty" yaml:"probe_wait_time"`
	HTTP          *HTTP         `json:"http,omitempty" yaml:"http"`
	GRPC          *GRPC         `json:"grpc,omitempty" yaml:"grpc"`
	SocketOption  *SocketOption `json:"socket_option,omitempty" yaml:"socket_option"`
	Restart       bool          `json:"restart,omitempty" yaml:"restart"`
}

Server represents the server configuration.

func (*Server) Bind

func (s *Server) Bind() *Server

Bind binds the actual value from the Server struct field.

func (*Server) Opts

func (s *Server) Opts() []server.Option

Opts sets the functional options into the []server.Option slice using the Server struct fields' value.

type Servers

type Servers struct {
	// Server represent server configuration.
	Servers []*Server `json:"servers" yaml:"servers"`

	// HealthCheckServers represent health check server configuration
	HealthCheckServers []*Server `json:"health_check_servers" yaml:"health_check_servers"`

	// MetricsServers represent metrics exporter server such as prometheus or opentelemetly or golang's pprof server
	MetricsServers []*Server `json:"metrics_servers" yaml:"metrics_servers"`

	// StartUpStrategy represent starting order of server name
	StartUpStrategy []string `json:"startup_strategy" yaml:"startup_strategy"`
	// ShutdownStrategy represent shutdonw order of server name
	ShutdownStrategy []string `json:"shutdown_strategy" yaml:"shutdown_strategy"`

	// FullShutdownDuration represent summary duration of shutdown time
	FullShutdownDuration string `json:"full_shutdown_duration" yaml:"full_shutdown_duration"`

	// TLS represent server tls configuration.
	TLS *TLS `json:"tls" yaml:"tls"`
}

Servers represents the configuration of server list.

func (*Servers) Bind

func (s *Servers) Bind() *Servers

Bind binds the actual value from the Servers struct field.

func (*Servers) GetGRPCStreamConcurrency added in v0.0.5

func (s *Servers) GetGRPCStreamConcurrency() (c int)

GetGRPCStreamConcurrency returns the gRPC stream concurrency.

type SessionOption added in v1.1.0

type SessionOption struct {
	Target       string `json:"target,omitempty" yaml:"target"`
	Base64Config string `json:"base64_config,omitempty" yaml:"base64_config"`
	Config       []byte `json:"-" yaml:"-"`
}

func (*SessionOption) Bind added in v1.1.0

func (s *SessionOption) Bind() *SessionOption

type SocketOption added in v1.0.3

type SocketOption struct {
	ReusePort                bool `json:"reuse_port,omitempty" yaml:"reuse_port"`
	ReuseAddr                bool `json:"reuse_addr,omitempty" yaml:"reuse_addr"`
	TCPFastOpen              bool `json:"tcp_fast_open,omitempty" yaml:"tcp_fast_open"`
	TCPNoDelay               bool `json:"tcp_no_delay,omitempty" yaml:"tcp_no_delay"`
	TCPCork                  bool `json:"tcp_cork,omitempty" yaml:"tcp_cork"`
	TCPQuickAck              bool `json:"tcp_quick_ack,omitempty" yaml:"tcp_quick_ack"`
	TCPDeferAccept           bool `json:"tcp_defer_accept,omitempty" yaml:"tcp_defer_accept"`
	IPTransparent            bool `json:"ip_transparent,omitempty" yaml:"ip_transparent"`
	IPRecoverDestinationAddr bool `json:"ip_recover_destination_addr,omitempty" yaml:"ip_recover_destination_addr"`
}

SocketOption represents the socket configurations.

func (*SocketOption) Bind added in v1.0.3

func (s *SocketOption) Bind() *SocketOption

Bind binds the actual data from the SocketOption fields.

func (*SocketOption) ToSocketFlag added in v1.0.3

func (s *SocketOption) ToSocketFlag() control.SocketFlag

ToSocketFlag returns the control.SocketFlag defined as uint along with the SocketOption's fields.

type Stackdriver added in v0.0.42

type Stackdriver struct {
	ProjectID string `json:"project_id" yaml:"project_id"`

	Client *StackdriverClient `json:"client" yaml:"client"`

	Exporter *StackdriverExporter `json:"exporter" yaml:"exporter"`
	Profiler *StackdriverProfiler `json:"profiler" yaml:"profiler"`
}

Stackdriver represents the configuration for the stackdriver.

func (*Stackdriver) Bind added in v0.0.42

func (sd *Stackdriver) Bind() *Stackdriver

Bind binds the actual data from the Stackdriver receiver fields.

type StackdriverClient added in v0.0.42

type StackdriverClient struct {
	APIKey                string   `json:"api_key" yaml:"api_key"`
	Audiences             []string `json:"audiences" yaml:"audiences"`
	CredentialsFile       string   `json:"credentials_file" yaml:"credentials_file"`
	CredentialsJSON       string   `json:"credentials_json" yaml:"credentials_json"`
	Endpoint              string   `json:"endpoint" yaml:"endpoint"`
	QuotaProject          string   `json:"quota_project" yaml:"quota_project"`
	RequestReason         string   `json:"request_reason" yaml:"request_reason"`
	Scopes                []string `json:"scopes" yaml:"scopes"`
	UserAgent             string   `json:"user_agent" yaml:"user_agent"`
	TelemetryEnabled      bool     `json:"telemetry_enabled" yaml:"telemetry_enabled"`
	AuthenticationEnabled bool     `json:"authentication_enabled" yaml:"authentication_enabled"`
}

StackdriverClient represents the configuration for the client of stackdriver.

type StackdriverExporter added in v0.0.42

type StackdriverExporter struct {
	MonitoringEnabled bool `json:"monitoring_enabled" yaml:"monitoring_enabled"`
	TracingEnabled    bool `json:"tracing_enabled" yaml:"tracing_enabled"`

	Location                 string `json:"location" yaml:"location"`
	BundleDelayThreshold     string `json:"bundle_delay_threshold" yaml:"bundle_delay_threshold"`
	BundleCountThreshold     int    `json:"bundle_count_threshold" yaml:"bundle_count_threshold"`
	TraceSpansBufferMaxBytes int    `json:"trace_spans_buffer_max_bytes" yaml:"trace_spans_buffer_max_bytes"`

	MetricPrefix string `json:"metric_prefix" yaml:"metric_prefix"`

	SkipCMD           bool   `json:"skip_cmd" yaml:"skip_cmd"`
	Timeout           string `json:"timeout" yaml:"timeout"`
	ReportingInterval string `json:"reporting_interval" yaml:"reporting_interval"`
	NumberOfWorkers   int    `json:"number_of_workers" yaml:"number_of_workers"`
}

StackdriverExporter represents the configuration for the exporter of stackdriver.

type StackdriverProfiler added in v0.0.42

type StackdriverProfiler struct {
	Enabled        bool   `json:"enabled" yaml:"enabled"`
	Service        string `json:"service" yaml:"service"`
	ServiceVersion string `json:"service_version" yaml:"service_version"`
	DebugLogging   bool   `json:"debug_logging" yaml:"debug_logging"`

	MutexProfiling     bool `json:"mutex_profiling" yaml:"mutex_profiling"`
	CPUProfiling       bool `json:"cpu_profiling" yaml:"cpu_profiling"`
	AllocProfiling     bool `json:"alloc_profiling" yaml:"alloc_profiling"`
	HeapProfiling      bool `json:"heap_profiling" yaml:"heap_profiling"`
	GoroutineProfiling bool `json:"goroutine_profiling" yaml:"goroutine_profiling"`

	AllocForceGC bool `json:"alloc_force_gc" yaml:"alloc_force_gc"`

	APIAddr string `json:"api_addr" yaml:"api_addr"`

	Instance string `json:"instance" yaml:"instance"`
	Zone     string `json:"zone" yaml:"zone"`
}

StackdriverProfiler represents the configuration for the profiler of stackdriver.

type TLS

type TLS struct {
	// Enable represent the server enable TLS or not.
	Enabled bool `yaml:"enabled" json:"enabled"`

	// Cert represent the certificate environment variable key used to start server.
	Cert string `yaml:"cert" json:"cert"`

	// Key represent the private key environment variable key used to start server.
	Key string `yaml:"key" json:"key"`

	// CA represent the CA certificate environment variable key used to start server.
	CA string `yaml:"ca" json:"ca"`

	// InsecureSkipVerify represent enable/disable skip SSL certificate verification
	InsecureSkipVerify bool `yaml:"insecure_skip_verify" json:"insecure_skip_verify"`
}

TLS represent the TLS configuration for server.

func (*TLS) Bind

func (t *TLS) Bind() *TLS

Bind returns TLS object whose every value except Enabled is field value of environment value.

func (*TLS) Opts

func (t *TLS) Opts() []tls.Option

Opts returns []tls.Option object whose every value is field value.

type Tensorflow added in v1.1.0

type Tensorflow struct {
	SessionOption         *SessionOption `json:"session_option,omitempty" yaml:"session_option"`
	ExportPath            string         `json:"export_path,omitempty" yaml:"export_path"`
	Tags                  []string       `json:"tags,omitempty" yaml:"tags"`
	Feeds                 []*OutputSpec  `json:"feeds,omitempty" yaml:"feeds"`
	FeedsMap              map[string]int `json:"-" yaml:"-"`
	Fetches               []*OutputSpec  `json:"fetches,omitempty" yaml:"fetches"`
	FetchesMap            map[string]int `json:"-" yaml:"-"`
	WarmupInputs          []string       `json:"warmup_inputs,omitempty" yaml:"warmup_inputs"`
	ResultNestedDimension uint8          `json:"result_nested_dimension,omitempty" yaml:"result_nested_dimension"`
}

Tensorflow represent the Tensorflow converter core configuration for server.

func (*Tensorflow) Bind added in v1.1.0

func (tf *Tensorflow) Bind() *Tensorflow

Bind returns Tensorflow object whose some string value is filed value or environment value.

type Trace added in v0.0.19

type Trace struct {
	Enabled      bool    `json:"enabled" yaml:"enabled"`
	SamplingRate float64 `json:"sampling_rate" yaml:"sampling_rate"`
}

Trace represents the configuration for the trace.

type Transport

type Transport struct {
	RoundTripper *RoundTripper `yaml:"round_tripper" json:"round_tripper"`
	Backoff      *Backoff      `yaml:"backoff" json:"backoff"`
}

TCP represents the TCP configuration for server.

func (*Transport) Bind

func (t *Transport) Bind() *Transport

Bind binds the actual data from the Transport receiver fields.

type VQueue added in v1.0.4

type VQueue struct {
	// InsertBufferSize represents insert channel buffer size
	InsertBufferSize int `json:"insert_buffer_size,omitempty" yaml:"insert_buffer_size"`

	// InsertBufferPoolSize represents insert time ordered slice buffer size
	InsertBufferPoolSize int `json:"insert_buffer_pool_size,omitempty" yaml:"insert_buffer_pool_size"`

	// DeleteBufferSize represents delete channel buffer size
	DeleteBufferSize int `json:"delete_buffer_size,omitempty" yaml:"delete_buffer_size"`

	// DeleteBufferPoolSize represents delete time ordered slice buffer size
	DeleteBufferPoolSize int `json:"delete_buffer_pool_size,omitempty" yaml:"delete_buffer_pool_size"`
}

VQueue represent the ngt vector queue buffer size

Jump to

Keyboard shortcuts

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