mirror of https://github.com/status-im/consul.git
agent: rename clientServer interface to delegate
This commit is contained in:
parent
22abd645a8
commit
d77d2be13e
|
@ -57,9 +57,9 @@ const (
|
||||||
// dnsNameRe checks if a name or tag is dns-compatible.
|
// dnsNameRe checks if a name or tag is dns-compatible.
|
||||||
var dnsNameRe = regexp.MustCompile(`^[a-zA-Z0-9\-]+$`)
|
var dnsNameRe = regexp.MustCompile(`^[a-zA-Z0-9\-]+$`)
|
||||||
|
|
||||||
// clientServer defines the interface shared by both
|
// delegate defines the interface shared by both
|
||||||
// consul.Client and consul.Server.
|
// consul.Client and consul.Server.
|
||||||
type clientServer interface {
|
type delegate interface {
|
||||||
Encrypted() bool
|
Encrypted() bool
|
||||||
GetLANCoordinate() (*coordinate.Coordinate, error)
|
GetLANCoordinate() (*coordinate.Coordinate, error)
|
||||||
Leave() error
|
Leave() error
|
||||||
|
@ -94,7 +94,7 @@ type Agent struct {
|
||||||
|
|
||||||
// delegate is either a *consul.Server or *consul.Client
|
// delegate is either a *consul.Server or *consul.Client
|
||||||
// depending on the configuration
|
// depending on the configuration
|
||||||
delegate clientServer
|
delegate delegate
|
||||||
|
|
||||||
// acls is an object that helps manage local ACL enforcement.
|
// acls is an object that helps manage local ACL enforcement.
|
||||||
acls *aclManager
|
acls *aclManager
|
||||||
|
|
Loading…
Reference in New Issue