2020-06-10 20:47:35 +00:00
|
|
|
package consul
|
|
|
|
|
|
|
|
import (
|
2021-04-20 22:14:46 +00:00
|
|
|
"github.com/hashicorp/go-hclog"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
|
2020-06-10 20:47:35 +00:00
|
|
|
"github.com/hashicorp/consul/agent/pool"
|
2020-08-27 15:23:52 +00:00
|
|
|
"github.com/hashicorp/consul/agent/router"
|
2020-06-10 20:47:35 +00:00
|
|
|
"github.com/hashicorp/consul/agent/token"
|
|
|
|
"github.com/hashicorp/consul/tlsutil"
|
|
|
|
)
|
|
|
|
|
2020-09-14 22:31:07 +00:00
|
|
|
type Deps struct {
|
|
|
|
Logger hclog.InterceptLogger
|
|
|
|
TLSConfigurator *tlsutil.Configurator
|
|
|
|
Tokens *token.Store
|
|
|
|
Router *router.Router
|
|
|
|
ConnPool *pool.ConnPool
|
2021-04-20 22:14:46 +00:00
|
|
|
GRPCConnPool GRPCClientConner
|
2021-07-22 18:58:08 +00:00
|
|
|
LeaderForwarder LeaderForwarder
|
2021-05-11 14:50:03 +00:00
|
|
|
EnterpriseDeps
|
2021-04-20 22:14:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type GRPCClientConner interface {
|
|
|
|
ClientConn(datacenter string) (*grpc.ClientConn, error)
|
2021-07-22 18:58:08 +00:00
|
|
|
ClientConnLeader() (*grpc.ClientConn, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type LeaderForwarder interface {
|
|
|
|
UpdateLeaderAddr(leaderAddr string)
|
2020-06-10 20:47:35 +00:00
|
|
|
}
|