pkg/{k8s,mesh}: introduce liveness checks

This commit introduces liveness checks to Kilo. This allows the Kilo
daemons to take nodes with inactive or dead Kilo deamons out of the
topology until they are alive again.
This commit is contained in:
Lucas Servén Marín
2019-04-02 18:25:08 +02:00
parent a8467f779e
commit 72bfb762b9
4 changed files with 64 additions and 7 deletions

View File

@@ -17,6 +17,7 @@ package mesh
import (
"net"
"testing"
"time"
)
func TestNewAllocator(t *testing.T) {
@@ -133,6 +134,7 @@ func TestReady(t *testing.T) {
ExternalIP: externalIP,
InternalIP: internalIP,
Key: []byte{},
LastSeen: time.Now().Unix(),
Subnet: &net.IPNet{IP: net.ParseIP("10.2.0.0"), Mask: net.CIDRMask(16, 32)},
},
ready: true,