[#92] client: Add docs about status returns

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-01-24 13:33:43 +03:00 committed by Alex Vanin
parent 213d20e3fb
commit 883a26d210
6 changed files with 51 additions and 21 deletions

View file

@ -61,6 +61,9 @@ func (x *EndpointInfoRes) setNodeInfo(info *netmap.NodeInfo) {
//
// Exactly one return value is non-nil. Server status return is returned in EndpointInfoRes.
// Reflects all internal errors in second return value (transport problems, response processing, etc.).
//
// Return statuses:
// - global (see Client docs).
func (c *Client) EndpointInfo(ctx context.Context, _ EndpointInfoPrm) (*EndpointInfoRes, error) {
// check context
if ctx == nil {
@ -136,6 +139,9 @@ func (x *NetworkInfoRes) setInfo(info *netmap.NetworkInfo) {
//
// Exactly one return value is non-nil. Server status return is returned in NetworkInfoRes.
// Reflects all internal errors in second return value (transport problems, response processing, etc.).
//
// Return statuses:
// - global (see Client docs).
func (c *Client) NetworkInfo(ctx context.Context, _ NetworkInfoPrm) (*NetworkInfoRes, error) {
// check context
if ctx == nil {