func (c *client) Register(tags []string) error {
	reg := &api.AgentServiceRegistration{
		ID:      c.name,
		Name:    c.name,
		Port:    c.port,
		Address: c.address,
		Tags:    tags,
	}
	return c.client.Agent().ServiceRegister(reg)
}
Register adds our service to consul
package discovery
import "github.com/hashicorp/consul/api"