Skip to content

Commit

Permalink
Implement network checker for nodeconfsource
Browse files Browse the repository at this point in the history
  • Loading branch information
mcrakhman committed Sep 2, 2024
1 parent aa16374 commit 96ed73d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions nodeconfsource/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ package nodeconfsource
import (
"context"
"fmt"
"github.com/anyproto/any-sync-coordinator/db"
"time"

"github.com/anyproto/any-sync/app"
"github.com/anyproto/any-sync/nodeconf"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"time"

"github.com/anyproto/any-sync-coordinator/db"
)

const collName = "nodeConf"
Expand Down Expand Up @@ -69,6 +71,10 @@ func (n *nodeConfSource) GetLast(ctx context.Context, currentId string) (c nodec
}, nil
}

func (n *nodeConfSource) IsNetworkNeedsUpdate(ctx context.Context) (bool, error) {
return false, nil
}

func (n *nodeConfSource) Add(conf nodeconf.Configuration, enable bool) (id string, err error) {
if conf.NetworkId == "" {
return "", fmt.Errorf("network id not specified")
Expand Down

0 comments on commit 96ed73d

Please sign in to comment.