Documentation ¶
Index ¶
- type Client
- type Config
- type DatasetIndexingOptions
- type NodeCore
- func (n *NodeCore) DatasetIsCheckedOut(datasetId string, client *pb.Client) (bool, error)
- func (n *NodeCore) HandshakeDirectoryServer(addr string) error
- func (n *NodeCore) HandshakePolicyStore(addr string) error
- func (n *NodeCore) IfritAddress() string
- func (n *NodeCore) IfritClient() *ifrit.Client
- func (n *NodeCore) IndexDataset(datasetId string, indexOptions *DatasetIndexingOptions) error
- func (n *NodeCore) Name() string
- func (n *NodeCore) RegisterDatasetHandler(f clientRequestHandler)
- func (n *NodeCore) RegisterMetadataHandler(f clientRequestHandler)
- func (n *NodeCore) RemoveDataset(id string)
- func (n *NodeCore) Shutdown()
- func (n *NodeCore) Start()
- func (n *NodeCore) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SQLConnectionString string // The name of this node Name string // If true, a dataset can be checked out multiple times by the same client AllowMultipleCheckouts bool // Port used by the HTTP server Port int // Interval that defines when the synchronization procedure will run SyncInterval time.Duration // Hostname used by the HTTP server HostName string }
type DatasetIndexingOptions ¶
type DatasetIndexingOptions struct {
AllowMultipleCheckouts bool
}
type NodeCore ¶
type NodeCore struct {
// contains filtered or unexported fields
}
TODO: refine storage of data. Ie: use database as the secondary storage with in-memory maps as the primary storage. Use retention policy to flush the caches to disk/db? Only flush deltas to disk/db to reduce data transfer
func NewNodeCore ¶
func NewNodeCore(cm certManager, gossipObs gossipObserver, dsManager datasetManager, stateSync stateSyncer, dcManager datasetCheckoutManager, config *Config) (*NodeCore, error)
TODO: reload dateapplied and datecreated from the databases on boot time.
func (*NodeCore) DatasetIsCheckedOut ¶
func (*NodeCore) HandshakeDirectoryServer ¶
func (*NodeCore) HandshakePolicyStore ¶
func (*NodeCore) IfritAddress ¶
func (*NodeCore) IfritClient ¶
TODO: restore checkouts from previous runs so that we don't lose information from memory. Especially for checkout datasets
func (*NodeCore) IndexDataset ¶
func (n *NodeCore) IndexDataset(datasetId string, indexOptions *DatasetIndexingOptions) error
RequestPolicy requests policies from policy store that are assigned to the dataset given by the id. It will also populate the node's database with the available identifiers and assoicate them with policies. You will have to call this method to make the datasets available to the clients.
func (*NodeCore) RegisterDatasetHandler ¶
func (n *NodeCore) RegisterDatasetHandler(f clientRequestHandler)
Registers the given handler when a compressed archive is fetched from a remote source.
func (*NodeCore) RegisterMetadataHandler ¶
func (n *NodeCore) RegisterMetadataHandler(f clientRequestHandler)
Registers the given handler when external metadata is requested.
func (*NodeCore) RemoveDataset ¶
Removes the dataset policy from the node. The dataset will no longer be available to clients.