Documentation
¶
Index ¶
- Variables
- func CQUpsert(c CassandraQuery) error
- func CassandraSessionInit(c CassandraConfig) error
- func CreateCassandraConnection(c CassandraConfig) (*gocql.Session, error)
- func CreateClient(config RedisConfig) *redis.Client
- func CreateKafkaConsumer(conf KafkaConf) (*kafka.Consumer, error)
- func CreateKafkaProducer(conf KafkaConf) (*kafka.Producer, error)
- func CreateKafkaSubscription(conf KafkaConf, topics []string, ch chan KafkaMessage) error
- func CreateRedisClient(config RedisConfig) *redis.Client
- func CreateSentinelConnection(config RedisConfig) *redis.Client
- func HeartbeatHandler(w http.ResponseWriter, r *http.Request)
- func HeartbeatResponseService(address string) error
- func Hold()
- func InitKafkaProducer(conf KafkaConf) error
- func LoadConfigurations(c Configuration) error
- func LoadConfigurationsFromDir(resourcesDir string, configuration Configuration) error
- func LoadRedisClient(config RedisConfig)
- func Produce(msg KfMsg) error
- func ToJSON(o interface{}) (string, error)
- func UTCMilisec() int64
- func UTCNow() time.Time
- func UUIDstring() string
- type CassandraConfig
- type CassandraQuery
- type Configuration
- type KafkaConf
- type KafkaMessage
- type KfMsg
- type RedisConfig
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
var CassandraSession *gocql.Session
CassandraSession holds cassandra sessions
var RedisClient *redis.Client
RedisClient is redis client
Functions ¶
func CQUpsert ¶
func CQUpsert(c CassandraQuery) error
CQUpsert will execute the CassandraQuery passed
func CassandraSessionInit ¶
func CassandraSessionInit(c CassandraConfig) error
CassandraSessionInit will load cassandra session
func CreateCassandraConnection ¶
func CreateCassandraConnection(c CassandraConfig) (*gocql.Session, error)
CreateCassandraConnection creates cassandra session
func CreateClient ¶
func CreateClient(config RedisConfig) *redis.Client
CreateClient will create normal client
func CreateKafkaConsumer ¶
CreateKafkaConsumer creates kafka consumers
func CreateKafkaProducer ¶
CreateKafkaProducer creates Kaka Producer
func CreateKafkaSubscription ¶
func CreateKafkaSubscription(conf KafkaConf, topics []string, ch chan KafkaMessage) error
CreateKafkaSubscription will create kafka consumer and startsubcripton to a channel
func CreateRedisClient ¶
func CreateRedisClient(config RedisConfig) *redis.Client
CreateRedisClient creates redis client
func CreateSentinelConnection ¶
func CreateSentinelConnection(config RedisConfig) *redis.Client
CreateSentinelConnection for creating Sentinel connection
func HeartbeatHandler ¶ added in v1.2.2
func HeartbeatHandler(w http.ResponseWriter, r *http.Request)
HeartbeatHandler for handeling
func HeartbeatResponseService ¶ added in v1.2.2
HeartbeatResponseService will start a app info service for
func InitKafkaProducer ¶
InitKafkaProducer creates Kaka Producer
func LoadConfigurations ¶
func LoadConfigurations(c Configuration) error
LoadConfigurations loads configurations
func LoadConfigurationsFromDir ¶ added in v1.0.1
func LoadConfigurationsFromDir(resourcesDir string, configuration Configuration) error
LoadConfigurationsFromDir Load Configurations From Dir
func LoadRedisClient ¶
func LoadRedisClient(config RedisConfig)
LoadRedisClient load redis client configuration
func Produce ¶
Produce will produce to kafka topic with if key passed. if the key passed is empty random uuid will be created
Types ¶
type CassandraConfig ¶
type CassandraConfig struct { Hosts string Port int Username string Password string Keyspace string Timeout int }
CassandraConfig is the cassandra configuration object
type CassandraQuery ¶
type CassandraQuery struct {
Querry string
}
CassandraQuery holds the query to be run
type Configuration ¶
type Configuration struct { Config interface{} EnvName string }
Configuration holds Config interface to be loaded and config validator
type KafkaMessage ¶
type KafkaMessage struct { Offset kafka.Offset Message string MessageBytes []byte PartitionIndex int32 Key string }
KafkaMessage is wrapper of kafka messages
type RedisConfig ¶
RedisConfig holds configuration for redisclient creation.
type ServerConfig ¶ added in v1.2.2
ServerConfig is for the server Configurations