Skip to content

ekomobile/consulsd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status GitHub release Go Report Card Downloads GoDoc

ConsulSD

Service discovery Consul wrapper

Usage

    // init service discovery
    sd, err := consulsd.NewServiceDiscovery()
    if err != nil {
        // ...
    }
    
    // get service
    service, err := sd.Get("awesome-service")
    if err != nil {
        // ...
    }

    address := service.Address()
    port := service.Port()