git.zd.zone/hrpc/hrpc@v0.0.12/option/consul.go (about)

     1  package option
     2  
     3  type Consul struct {
     4  	Address    string
     5  	Token      string
     6  	DataCenter string
     7  	// Prefix default value will be the current environment's name
     8  	Prefix string
     9  }
    10  
    11  func WithConsul(c Consul) Option {
    12  	return func(o *Options) {
    13  		o.ConsulCenter = c
    14  	}
    15  }