Documentation ¶
Index ¶
Constants ¶
View Source
const ( RedisTimeout = 5 * time.Second ListenerTimeout = 11 * time.Second // used to avoid timeout on listener - for-select timeout )
Variables ¶
View Source
var LogLevel = loadEnv("LOG_LEVEL", "debug")
View Source
var (
Rdb *redis.Client
)
View Source
var RdbHostPort = loadEnv("RDB_HOST_PORT", "localhost:6379")
Functions ¶
func SetLogLevel ¶
Types ¶
type ProductEvent ¶
type ProductEvent struct { Operation string `json:"operation"` Old struct { Active bool `json:"active"` ProductID int `json:"product_id"` Name string `json:"name"` Quantity int `json:"quantity,omitempty"` Price int `json:"price"` } `json:"old"` New struct { Active bool `json:"active"` ProductID int `json:"product_id"` Name string `json:"name"` Quantity int `json:"quantity,omitempty"` Price int `json:"price"` } `json:"new"` }
Click to show internal directories.
Click to hide internal directories.