Documentation ¶
Index ¶
- type Config
- type DBConfig
- type DBHelperConfig
- type GooglePubSubArg
- type GraphqlConfig
- type GraphqlPlaygroundConfig
- type HttpConfig
- type JobEndpointConfig
- type JobInitializerConfig
- type MQConfig
- type NatsArg
- type OpenTracingConfig
- type PullQueue
- type PushQueue
- type RedisConfig
- type RedisStreamArg
- type TaskSchedulerConfig
- type TaskWorkerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { LogLevel string `mapstructure:"log_level"` LogFormat string `mapstructure:"log_format"` HTTP HttpConfig `mapstructure:"http"` MQ MQConfig `mapstructure:"mq"` DB DBConfig `mapstructure:"db"` Redis RedisConfig `mapstructure:"redis"` JobEndpoint JobEndpointConfig `mapstructure:"job_endpoint"` JobInitializer JobInitializerConfig `mapstructure:"job_initializer"` TaskScheduler TaskSchedulerConfig `mapstructure:"task_scheduler"` DBHelper DBHelperConfig `mapstructure:"db_helper"` TaskWorker TaskWorkerConfig `mapstructure:"task_worker"` OpenTracing OpenTracingConfig `mapstructure:"open_tracing"` }
type DBConfig ¶
type DBConfig struct { Driver string `mapstructure:"driver"` Host string `mapstructure:"host"` Port uint `mapstructure:"port"` DBName string `mapstructure:"dbname"` InstanceName string `mapstructure:"instance_name"` User string `mapstructure:"user"` Password string `mapstructure:"password"` ConnectTimeout string `mapstructure:"connect_timeout"` ReadTimeout string `mapstructure:"read_timeout"` WriteTimeout string `mapstructure:"write_timeout"` DialTimeout time.Duration `mapstructure:"dial_timeout"` MaxLifetime time.Duration `mapstructure:"max_lifetime"` MaxIdleTime time.Duration `mapstructure:"max_idletime"` MaxIdleConn int `mapstructure:"max_idle_conn"` MaxOpenConn int `mapstructure:"max_open_conn"` SSLMode bool `mapstructure:"ssl_mode"` LogLevel int `mapstructure:"log_level"` }
type DBHelperConfig ¶
type GooglePubSubArg ¶
type GooglePubSubArg struct { CredentialPath string `mapstructure:"credential_path"` Synchronous bool `mapstructure:"synchronous"` MaxOutstandingMessages int `mapstructure:"max_outstanding_messages"` MaxOutstandingBytes int `mapstructure:"max_outstanding_bytes"` NumGoroutines int `mapstructure:"num_goroutines"` }
type GraphqlConfig ¶
type GraphqlConfig struct { Endpoint string `mapstructure:"endpoint"` Playground GraphqlPlaygroundConfig `mapstructure:"playground"` }
type GraphqlPlaygroundConfig ¶
type HttpConfig ¶
type HttpConfig struct { Port uint `mapstructure:"port"` Graphql GraphqlConfig `mapstructure:"graphql"` }
type JobEndpointConfig ¶
type JobEndpointConfig struct {
InitJob PushQueue `mapstructure:"init_job"`
}
type JobInitializerConfig ¶
type MQConfig ¶
type MQConfig struct { Driver string `mapstructure:"driver"` StopTimeout time.Duration `mapstructure:"stop_timeout"` Distribution int `mapstructure:"distribution"` GooglePubSub GooglePubSubArg `mapstructure:"google_pub_sub"` Nats NatsArg `mapstructure:"nats"` RedisStream RedisStreamArg `mapstructure:"redis_stream"` }
type NatsArg ¶
type NatsArg struct { Servers []string `mapstructure:"servers"` MaxReconnect int `mapstructure:"max_reconnect"` ReconnectWait time.Duration `mapstructure:"reconnect_wait"` RetryOnFailedConnect bool `mapstructure:"retry_on_failed_connect"` ClusterName string `mapstructure:"cluster_name"` DurableName string `mapstructure:"durable_name"` QueueGroup string `mapstructure:"queue_group"` MaxInflight int `mapstructure:"max_inflight"` MaxPubAcksInflight int `mapstructure:"max_pub_acks_inflight"` WorkerSize int `mapstructure:"worker_size"` AckWait time.Duration `mapstructure:"ack_wait"` PingInterval int `mapstructure:"ping_interval"` PingMaxOut int `mapstructure:"ping_max_out"` User string `mapstructure:"user"` Password string `mapstructure:"password"` Token string `mapstructure:"token"` }
type OpenTracingConfig ¶
type OpenTracingConfig struct { Enable bool `mapstructure:"enable"` Driver string `mapstructure:"driver"` ServiceName string `mapstructure:"service_name"` RemoteReporter string `mapstructure:"remote_reporter"` LocalReporter string `mapstructure:"local_reporter"` CustomTag map[string]interface{} `mapstructure:"custom_tag"` }
type RedisConfig ¶
type RedisConfig struct { Host string `mapstructure:"host"` Port uint `mapstructure:"port"` DB int `mapstructure:"db"` Password string `mapstructure:"password"` MinIdleConns int `mapstructure:"min_idle_conns"` PoolSize int `mapstructure:"pool_size"` LockTimeout time.Duration `mapstructure:"lock_timeout"` LockFlushTime time.Duration `mapstructure:"lock_flush_time"` DialTimeout time.Duration `mapstructure:"dial_timeout"` }
type RedisStreamArg ¶
type RedisStreamArg struct { RedisOption RedisConfig `mapstructure:"redis_option"` NumConsumers int `mapstructure:"num_consumers"` PrefetchLimit int64 `mapstructure:"prefetch_limit"` PollDuration time.Duration `mapstructure:"poll_duration"` ProcessTimeout time.Duration `mapstructure:"process_timeout"` }
type TaskSchedulerConfig ¶
type TaskWorkerConfig ¶
Click to show internal directories.
Click to hide internal directories.