Documentation ¶
Index ¶
- func AddrFromPeer(remote *peer.Peer) (peerHost string)
- func ExtractTarGz(localPath string, r io.ReadCloser) error
- func FailIfMultiNodes(ctx context.Context, command string) error
- func Fatalf(message string, args ...interface{})
- func RemotePeer(ctx context.Context) (peerHost string)
- func Should(err error)
- func Warning(message string, args ...interface{})
- func WithCLIContext(ctx context.Context, f func(context.Context) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddrFromPeer ¶ added in v0.3.0
AddrFromPeer extracts peer address from grpc Peer.
func ExtractTarGz ¶ added in v0.3.0
func ExtractTarGz(localPath string, r io.ReadCloser) error
ExtractTarGz extracts .tar.gz archive from r into filesystem under localPath.
nolint: gocyclo
func FailIfMultiNodes ¶ added in v0.3.0
FailIfMultiNodes checks if ctx contains multi-node request metadata.
func Fatalf ¶
func Fatalf(message string, args ...interface{})
Fatalf prints formatted message to stderr and aborts execution
func RemotePeer ¶ added in v0.3.0
RemotePeer parses remote peer address from grpc stream context.
func Should ¶
func Should(err error)
Should panics if err != nil
Should is useful when error should never happen in customer environment, it can only be development error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.