Documentation
¶
Index ¶
- func InitLog(appName bamboo.ContextKey, cfg *LogConfig) error
- func InitTracerProvider(appName string, traceConfig *TraceConfig) (*sdktrace.TracerProvider, error)
- func LogConfigFunc(ctx context.Context, headers map[string]string) context.Context
- func SignalWatchProcess(ctx context.Context) error
- type BambooFactory
- type ConsumerConfig
- type GoroutineConsumerConfig
- type GoroutineRequestProducerConfig
- type JaegerConfig
- type KafkaConsumerConfig
- type KafkaRequestProducerConfig
- type LogConfig
- type PublisherConfig
- type RedisConsumerConfig
- type RedisPublisherConfig
- type RedisRequestProducerConfig
- type RedisResultSubscriberConfig
- type RequestProducerConfig
- type ResultSubscriberConfig
- type TraceConfig
- type WorkerClientConfig
- type WorkerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitTracerProvider ¶
func InitTracerProvider(appName string, traceConfig *TraceConfig) (*sdktrace.TracerProvider, error)
func LogConfigFunc ¶
func SignalWatchProcess ¶ added in v0.0.2
Types ¶
type BambooFactory ¶ added in v0.0.2
type BambooFactory interface { CreateBambooWorkerClient(ctx context.Context, workerName string, cfg *WorkerClientConfig) (bamboo.BambooWorkerClient, error) CreateBambooWorker(cfg *WorkerConfig, workerFunc bamboo.WorkerFunc) (bamboo.BambooWorker, error) }
func NewBambooFactory ¶ added in v0.0.2
func NewBambooFactory() BambooFactory
type ConsumerConfig ¶
type ConsumerConfig struct { Type string `yaml:"type" validate:"required"` Kafka *KafkaConsumerConfig `yaml:"kafka"` Redis *RedisConsumerConfig `yaml:"redis"` Goroutine *GoroutineConsumerConfig `yaml:"goroutine"` }
type GoroutineConsumerConfig ¶ added in v0.0.2
type GoroutineConsumerConfig struct {
Channel string `yaml:"channel" validate:"required"`
}
type GoroutineRequestProducerConfig ¶ added in v0.0.2
type GoroutineRequestProducerConfig struct {
Channel string `yaml:"channel" validate:"required"`
}
type JaegerConfig ¶
type JaegerConfig struct {
Endpoint string `yaml:"endpoint" validate:"required"`
}
type KafkaConsumerConfig ¶
type PublisherConfig ¶
type PublisherConfig struct { Type string `yaml:"type" validate:"required"` Redis *RedisPublisherConfig `yaml:"redis"` }
type RedisConsumerConfig ¶
type RedisPublisherConfig ¶
type RedisResultSubscriberConfig ¶
type RedisResultSubscriberConfig struct { Addrs []string `yaml:"addrs" validate:"required"` Password string `yaml:"password"` }
result
type RequestProducerConfig ¶
type RequestProducerConfig struct { Type string `yaml:"type" validate:"required"` Kafka *KafkaRequestProducerConfig `yaml:"kafka"` Redis *RedisRequestProducerConfig `yaml:"redis"` Goroutine *GoroutineRequestProducerConfig `yaml:"goroutine"` }
request
type ResultSubscriberConfig ¶
type ResultSubscriberConfig struct { Type string `yaml:"type" validate:"required"` Redis *RedisResultSubscriberConfig `yaml:"redis"` }
type TraceConfig ¶
type TraceConfig struct { Exporter string `yaml:"exporter" validate:"required"` Jaeger *JaegerConfig `yaml:"jaeger"` }
type WorkerClientConfig ¶
type WorkerClientConfig struct { RequestProducer *RequestProducerConfig `yaml:"requestProducer" validate:"required"` ResultSubscriber *ResultSubscriberConfig `yaml:"resultSubscriber" validate:"required"` }
client
type WorkerConfig ¶
type WorkerConfig struct { Consumer *ConsumerConfig `yaml:"consumer"` Publisher *PublisherConfig `yaml:"publisher"` NumWorkers int `yaml:"numWorkers"` }
worker
Click to show internal directories.
Click to hide internal directories.