-
Notifications
You must be signed in to change notification settings - Fork 27
/
config.go
44 lines (35 loc) · 1.1 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package bokchoy
import "github.com/redis/go-redis/v9"
// RedisClusterConfig contains the redis cluster configuration.
type RedisClusterConfig redis.ClusterOptions
// RedisClientConfig contains the redis client configuration.
type RedisClientConfig redis.Options
// RedisSentinelConfig contains the redis sentinel configuration.
type RedisSentinelConfig redis.FailoverOptions
// RedisConfig contains all redis configuration: client, sentinel (failover), cluster.
type RedisConfig struct {
Type string
Prefix string
Client RedisClientConfig
Cluster RedisClusterConfig
Sentinel RedisSentinelConfig
}
// QueueConfig contains queue information that should be initialized.
type QueueConfig struct {
Name string
}
// BrokerConfig contains the broker configuration.
type BrokerConfig struct {
Type string
Redis RedisConfig
}
// Config contains the main configuration to initialize Bokchoy.
type Config struct {
Queues []QueueConfig
Broker BrokerConfig
Serializer SerializerConfig
}
// SerializerConfig contains a serializer configuration to store tasks.
type SerializerConfig struct {
Type string
}