frostfs-sdk-go/netmap/doc.go
Pavel Pogodaev 6ce73790ea
All checks were successful
DCO / DCO (pull_request) Successful in 38s
Tests and linters / Tests (pull_request) Successful in 1m13s
Tests and linters / Lint (pull_request) Successful in 2m36s
[#276] Merge repo with frostfs-api-go
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
2024-10-22 14:05:12 +00:00

43 lines
1.2 KiB
Go

/*
Package netmap provides functionality for working with information about the
FrostFS network, primarily a layer of storage nodes.
The package concentrates all the characteristics of FrostFS networks.
NetMap represents FrostFS network map - one of the main technologies used to
store data in the system. It is composed of information about all storage nodes
(NodeInfo type) in a particular network. NetMap methods allow you to impose
container storage policies (PlacementPolicy type) on a fixed composition of
nodes for selecting nodes corresponding to the placement rules chosen by the
container creator.
NetworkInfo type is dedicated to descriptive characterization of network state
and settings.
Instances can be also used to process FrostFS API V2 protocol messages
(see neo.fs.v2.netmap package in https://git.frostfs.info/TrueCloudLab/frostfs-api).
On client side:
import "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/netmap"
var msg netmap.NodeInfo
info.WriteToV2(&msg)
// send msg
On server side:
// recv msg
var info NodeInfo
err := info.ReadFromV2(msg)
// ...
// process info
Using package types in an application is recommended to potentially work with
different protocol versions with which these types are compatible.
*/
package netmap