Documentation
¶
Overview ¶
Package client provides a client interface to interact with server APIs
Index ¶
- Variables
- type ClientSet
- func (c *ClientSet) Close() error
- func (c *ClientSet) Connect()
- func (c *ClientSet) ContainerSetV1() *containersetv1.ClientV1
- func (c *ClientSet) EventV1() *eventv1.ClientV1
- func (c *ClientSet) ID() string
- func (c *ClientSet) LeaseV1() leasev1.ClientV1
- func (c *ClientSet) LogV1() *logv1.ClientV1
- func (c *ClientSet) NodeV1() nodev1.ClientV1
- func (c *ClientSet) State() connectivity.State
- func (c *ClientSet) TaskV1() taskv1.ClientV1
- func (c *ClientSet) VolumeV1() volumev1.ClientV1
- type Config
- type NewClientOption
- func WithClientID(id string) NewClientOption
- func WithGrpcDialOption(opts ...grpc.DialOption) NewClientOption
- func WithLogger(l logger.Logger) NewClientOption
- func WithTLSConfig(t *tls.Config) NewClientOption
- func WithTLSConfigFromCfg(cfg *Config) NewClientOption
- func WithTLSConfigFromFlags(f *pflag.FlagSet) NewClientOption
- type Server
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCurrentNotSet = errors.New("current server is not set") ErrCurrentNotFound = errors.New("current server not found") ErrServerNotFound = errors.New("server not found") )
View Source
var DefaultTLSConfig = &tls.Config{ InsecureSkipVerify: false, }
Functions ¶
This section is empty.
Types ¶
type ClientSet ¶
type ClientSet struct {
NodeV1Client nodev1.ClientV1
TaskV1Client taskv1.ClientV1
// contains filtered or unexported fields
}
func (*ClientSet) ContainerSetV1 ¶
func (c *ClientSet) ContainerSetV1() *containersetv1.ClientV1
func (*ClientSet) State ¶
func (c *ClientSet) State() connectivity.State
type Config ¶
type Config struct {
Version string `mapstructure:"version" json:"version" yaml:"version"`
Servers []*Server `mapstructure:"servers" json:"servers" yaml:"servers"`
Current string `mapstructure:"current" json:"current" yaml:"current"`
}
func (*Config) CurrentServer ¶
type NewClientOption ¶
func WithClientID ¶
func WithClientID(id string) NewClientOption
func WithGrpcDialOption ¶
func WithGrpcDialOption(opts ...grpc.DialOption) NewClientOption
func WithLogger ¶
func WithLogger(l logger.Logger) NewClientOption
func WithTLSConfig ¶
func WithTLSConfig(t *tls.Config) NewClientOption
func WithTLSConfigFromCfg ¶
func WithTLSConfigFromCfg(cfg *Config) NewClientOption
WithTLSConfigFromCfg returns a NewClientOption using the provided client.Config. It runs Validate() on the config before returning. If passed in client config doesn't have tls configuration, then tls config is not set on the client.
func WithTLSConfigFromFlags ¶
func WithTLSConfigFromFlags(f *pflag.FlagSet) NewClientOption
type Server ¶
type TLSConfig ¶
type TLSConfig struct {
CA string `mapstructure:"ca,omitempty" json:"ca,omitempty" yaml:"ca,omitempty"`
Certificate string `mapstructure:"certificate,omitempty" json:"certificate,omitempty" yaml:"certificate,omitempty"`
Key string `mapstructure:"key,omitempty" json:"key,omitempty" yaml:"key,omitempty"`
Insecure bool `mapstructure:"insecure,omitempty" json:"insecure,omitempty" yaml:"insecure,omitempty"`
}
Directories
¶
| Path | Synopsis |
|---|---|
|
containerset
|
|
|
event
|
|
|
v1
Package v1 provides a client for working with events
|
Package v1 provides a client for working with events |
|
lease
|
|
|
v1
Package v1 is a generated GoMock package.
|
Package v1 is a generated GoMock package. |
|
log
|
|
|
v1
Package log provides a client interface to interact with logs
|
Package log provides a client interface to interact with logs |
|
node
|
|
|
v1
Package v1 is a generated GoMock package.
|
Package v1 is a generated GoMock package. |
|
task
|
|
|
v1
Package v1 is a generated GoMock package.
|
Package v1 is a generated GoMock package. |
|
volume
|
|
|
v1
Package v1 is a generated GoMock package.
|
Package v1 is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.