예제 #1
0
func InitRedis(config *agentdesks.Config) redis.Conn {
	host := ":" + config.GetRedisPort()
	conn, err := redis.Dial(config.GetRedisProtocol(), host)
	if err != nil {
		utils.PanicError(err, "Error establishing redis connection")
	}
	return conn
}
예제 #2
0
func NewImageHelper(conf *agentdesks.Config) *ImageHelper {
	return &ImageHelper{
		Config: conf,
		s3Conn: s3.New(session.New(), &aws.Config{Region: aws.String(conf.GetAmazonS3Region())}),
	}
}