Lines Matching defs:Transport
47 type Transport struct { struct
48 config *Config
50 unknownc chan raftpb.Message
52 mu sync.Mutex
53 peers map[uint64]*peer
54 stopped bool
56 ctx context.Context
57 cancel context.CancelFunc
58 done chan struct{}
60 deferredConns map[*grpc.ClientConn]*time.Timer
83 func (t *Transport) run(ctx context.Context) {
119 func (t *Transport) Stop() {
125 func (t *Transport) Send(m raftpb.Message) error {
157 func (t *Transport) AddPeer(id uint64, addr string) error {
179 func (t *Transport) RemovePeer(id uint64) error {
208 func (t *Transport) UpdatePeer(id uint64, addr string) error {
228 func (t *Transport) UpdatePeerAddr(id uint64, addr string) error {
243 func (t *Transport) PeerConn(id uint64) (*grpc.ClientConn, error) {
260 func (t *Transport) PeerAddr(id uint64) (string, error) {
271 func (t *Transport) HealthCheck(ctx context.Context, id uint64) error {
284 func (t *Transport) Active(id uint64) bool {
299 func (t *Transport) LongestActive() (uint64, error) {
310 func (t *Transport) longestActive() (*peer, error) {
335 func (t *Transport) dial(addr string) (*grpc.ClientConn, error) {
366 func (t *Transport) withContext(ctx context.Context) (context.Context, context.CancelFunc) {
379 func (t *Transport) resolvePeer(ctx context.Context, id uint64) (*peer, error) {
393 func (t *Transport) sendUnknownMessage(ctx context.Context, m raftpb.Message) error {