forked from TrueCloudLab/frostfs-sdk-go
[#322] *: Go fmt -s
go1.19 rewrites comments to proper render them in docs. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
7537fa0dec
commit
84888854ab
69 changed files with 272 additions and 219 deletions
|
@ -3,27 +3,30 @@ Package container provides functionality related to the NeoFS containers.
|
|||
|
||||
The base type is Container. To create new container in the NeoFS network
|
||||
Container instance should be initialized
|
||||
var cnr Container
|
||||
cnr.Init()
|
||||
// fill all the fields
|
||||
|
||||
// encode cnr and send
|
||||
var cnr Container
|
||||
cnr.Init()
|
||||
// fill all the fields
|
||||
|
||||
// encode cnr and send
|
||||
|
||||
After the container is persisted in the NeoFS network, applications can process
|
||||
it using the instance of Container types
|
||||
// recv binary container
|
||||
|
||||
var cnr Container
|
||||
// recv binary container
|
||||
|
||||
err := cnr.Unmarshal(bin)
|
||||
// ...
|
||||
var cnr Container
|
||||
|
||||
// process the container data
|
||||
err := cnr.Unmarshal(bin)
|
||||
// ...
|
||||
|
||||
// process the container data
|
||||
|
||||
Instances can be also used to process NeoFS API V2 protocol messages
|
||||
(see neo.fs.v2.container package in https://github.com/nspcc-dev/neofs-api).
|
||||
|
||||
On client side:
|
||||
|
||||
import "github.com/nspcc-dev/neofs-api-go/v2/container"
|
||||
|
||||
var msg container.Container
|
||||
|
@ -32,6 +35,7 @@ On client side:
|
|||
// send msg
|
||||
|
||||
On server side:
|
||||
|
||||
// recv msg
|
||||
|
||||
var cnr Container
|
||||
|
@ -41,6 +45,5 @@ On server side:
|
|||
|
||||
Using package types in an application is recommended to potentially work with
|
||||
different protocol versions with which these types are compatible.
|
||||
|
||||
*/
|
||||
package container
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue