git.frostfs.info/TrueCloudLab/frostfs-sdk-go@v0.0.0-20241022124111-5361f0ecebd3/netmap/doc.go (about)

     1  /*
     2  Package netmap provides functionality for working with information about the
     3  FrostFS network, primarily a layer of storage nodes.
     4  
     5  The package concentrates all the characteristics of FrostFS networks.
     6  
     7  NetMap represents FrostFS network map - one of the main technologies used to
     8  store data in the system. It is composed of information about all storage nodes
     9  (NodeInfo type) in a particular network. NetMap methods allow you to impose
    10  container storage policies (PlacementPolicy type) on a fixed composition of
    11  nodes for selecting nodes corresponding to the placement rules chosen by the
    12  container creator.
    13  
    14  NetworkInfo type is dedicated to descriptive characterization of network state
    15  and settings.
    16  
    17  Instances can be also used to process FrostFS API V2 protocol messages
    18  (see neo.fs.v2.netmap package in https://git.frostfs.info/TrueCloudLab/frostfs-api).
    19  
    20  On client side:
    21  
    22  	import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
    23  
    24  	var msg netmap.NodeInfo
    25  	info.WriteToV2(&msg)
    26  
    27  	// send msg
    28  
    29  On server side:
    30  
    31  	// recv msg
    32  
    33  	var info NodeInfo
    34  
    35  	err := info.ReadFromV2(msg)
    36  	// ...
    37  
    38  	// process info
    39  
    40  Using package types in an application is recommended to potentially work with
    41  different protocol versions with which these types are compatible.
    42  */
    43  package netmap