Documentation ¶
Index ¶
- func Context(cmd *cobra.Command) context.Context
- func Dial(cmd *cobra.Command) (api.ControlClient, error)
- func DialConn(cmd *cobra.Command) (*grpc.ClientConn, error)
- func FprintfIfNotEmpty(w io.Writer, format string, v interface{})
- func ParseLogDriverFlags(flags *pflag.FlagSet) (*api.Driver, error)
- func PrintHeader(w io.Writer, columns ...string)
- func TimestampAgo(ts *gogotypes.Timestamp) string
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(cmd *cobra.Command) (api.ControlClient, error)
Dial establishes a connection and creates a client. It infers connection parameters from CLI options.
func DialConn ¶
func DialConn(cmd *cobra.Command) (*grpc.ClientConn, error)
DialConn establishes a connection to SwarmKit.
func FprintfIfNotEmpty ¶
FprintfIfNotEmpty prints only if `s` is not empty.
NOTE(stevvooe): Not even remotely a printf function.. doesn't take args.
func ParseLogDriverFlags ¶
ParseLogDriverFlags parses a silly string format for log driver and options. Fully baked log driver config should be returned.
If no log driver is available, nil, nil will be returned.
func PrintHeader ¶
PrintHeader prints a nice little header.
func TimestampAgo ¶
TimestampAgo returns a relative time string from a timestamp (e.g. "12 seconds ago").
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver provides ID to Name resolution.
func NewResolver ¶
func NewResolver(cmd *cobra.Command, c api.ControlClient) *Resolver
NewResolver creates a new Resolver.