ernest_config_client

package module
v0.0.0-...-9588aab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2018 License: MPL-2.0 Imports: 9 Imported by: 6

README

ernest-config-client

This library is intended to be a client to build services based on ernest-config service.

Installation

go get -u github.com/ernestio/ernest-config-client

Usage

import "github.com/ernestio/ernest-config-client"

func main() {
  c := ernest_config_client.NewConfig("nats://127.0.0.1:4222")

  # Get a redis client
  r := c.Redis()

  # Get a postgres client
  p := c.Postgres()

  # get the nats client
  n := c.Nats()
}

Contributing

Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.

Moreover, if your pull request contains patches or features, you must include relevant unit tests.

Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, this project is maintained under the Semantic Versioning guidelines.

Code and documentation copyright since 2015 ernest.io authors.

Code released under the Mozilla Public License Version 2.0.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(natsURI string) *Config

func (*Config) GetConfig

func (c *Config) GetConfig(ctype string, result interface{}) error

func (*Config) Nats

func (c *Config) Nats() *nats.Conn

func (*Config) Postgres

func (c *Config) Postgres(table string) *gorm.DB

func (*Config) Redis

func (c *Config) Redis() *redis.Client

func (*Config) SetConnector

func (c *Config) SetConnector(conn akira.Connector)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL