frostfs-api-go/v2/client/proto.go
Leonard Lyubich 9253dac753 v2: Add cross-service client package
Add package with cross-service client utilities for working with transport
protocols and basic network types.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:43:36 +03:00

23 lines
293 B
Go

package client
import (
"github.com/pkg/errors"
)
type Protocol uint32
const (
_ Protocol = iota
ProtoGRPC
)
var ErrProtoUnsupported = errors.New("unsupported protocol")
func (p Protocol) String() string {
switch p {
case ProtoGRPC:
return "GRPC"
default:
return "UNKNOWN"
}
}