Channels impl
Compare changes
- David Stainton authored
+ 27
− 0
@@ -49,6 +49,8 @@ type NameService interface {
@@ -57,6 +59,8 @@ func loadRegistrationDisk(kv *versioned.KV) (registrationDisk, error) {
@@ -71,6 +75,8 @@ func saveRegistrationDisk(kv *versioned.KV, reg registrationDisk) error {
@@ -80,6 +86,7 @@ type registrationDisk struct {
@@ -90,6 +97,8 @@ func newRegistrationDisk(publicKey ed25519.PublicKey, privateKey ed25519.Private
@@ -98,6 +107,7 @@ func (r registrationDisk) Update(lease int64, signature []byte) {
@@ -105,6 +115,7 @@ func (r registrationDisk) Marshall() ([]byte, error) {
@@ -114,6 +125,7 @@ func UnmarshallRegistrationDisk(data []byte) (registrationDisk, error) {
@@ -121,6 +133,7 @@ func (r registrationDisk) GetLease() time.Time {
@@ -128,6 +141,7 @@ func (r registrationDisk) GetPublicKey() ed25519.PublicKey {
@@ -135,6 +149,7 @@ func (r registrationDisk) GetPrivateKey() ed25519.PrivateKey {
@@ -142,6 +157,9 @@ func (r registrationDisk) GetLeaseSignature() ([]byte, time.Time) {
@@ -157,8 +175,10 @@ type clientIDTracker struct {
@@ -204,6 +224,8 @@ func (c *clientIDTracker) Start() (stoppable.Stoppable, error) {
@@ -256,6 +278,9 @@ func (c *clientIDTracker) ValidateChannelMessage(username string, lease time.Tim
@@ -267,6 +292,8 @@ func (c *clientIDTracker) register() error {