Documentation
¶
Overview ¶
Package client provides a client interface to interact with server APIs
Index ¶
- Variables
- type ClientSet
- func (c *ClientSet) BackendV1() backendv1.ClientV1
- func (c *ClientSet) CAV1() cav1.ClientV1
- func (c *ClientSet) CertificateV1() certificatev1.ClientV1
- func (c *ClientSet) Close() error
- func (c *ClientSet) Connect()
- func (c *ClientSet) CredentialV1() credentialv1.ClientV1
- func (c *ClientSet) HealthV1() *healthv1.ClientV1
- func (c *ClientSet) PolicyV1() policyv1.ClientV1
- func (c *ClientSet) RouteV1() routev1.ClientV1
- func (c *ClientSet) State() connectivity.State
- func (c *ClientSet) TokenV1() tokenv1.ClientV1
- type Config
- type NewClientOption
- func WithBackendClient(backendv1Client backendv1.ClientV1) NewClientOption
- func WithCAClient(cav1Client cav1.ClientV1) NewClientOption
- func WithCertificateClient(certificatev1Client certificatev1.ClientV1) NewClientOption
- func WithCredentialClient(credentialv1Client credentialv1.ClientV1) NewClientOption
- func WithGrpcDialOption(opts ...grpc.DialOption) NewClientOption
- func WithIdentity(id *identity.AtomicIdentity) NewClientOption
- func WithLogger(l logger.Logger) NewClientOption
- func WithPolicyClient(policyv1Client policyv1.ClientV1) NewClientOption
- func WithRouteClient(routev1Client routev1.ClientV1) 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 {
// contains filtered or unexported fields
}
func (*ClientSet) CertificateV1 ¶
func (c *ClientSet) CertificateV1() certificatev1.ClientV1
func (*ClientSet) CredentialV1 ¶
func (c *ClientSet) CredentialV1() credentialv1.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 WithBackendClient ¶
func WithBackendClient(backendv1Client backendv1.ClientV1) NewClientOption
func WithCAClient ¶
func WithCAClient(cav1Client cav1.ClientV1) NewClientOption
func WithCertificateClient ¶
func WithCertificateClient(certificatev1Client certificatev1.ClientV1) NewClientOption
func WithCredentialClient ¶
func WithCredentialClient(credentialv1Client credentialv1.ClientV1) NewClientOption
func WithGrpcDialOption ¶
func WithGrpcDialOption(opts ...grpc.DialOption) NewClientOption
func WithIdentity ¶
func WithIdentity(id *identity.AtomicIdentity) NewClientOption
func WithLogger ¶
func WithLogger(l logger.Logger) NewClientOption
func WithPolicyClient ¶
func WithPolicyClient(policyv1Client policyv1.ClientV1) NewClientOption
func WithRouteClient ¶
func WithRouteClient(routev1Client routev1.ClientV1) 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 |
|---|---|
|
backend
|
|
|
v1
Package v1 is a generated GoMock package.
|
Package v1 is a generated GoMock package. |
|
ca
|
|
|
v1
Package v1 is a generated GoMock package.
|
Package v1 is a generated GoMock package. |
|
certificate
|
|
|
v1
Package v1 is a generated GoMock package.
|
Package v1 is a generated GoMock package. |
|
credential
|
|
|
v1
Package v1 is a generated GoMock package.
|
Package v1 is a generated GoMock package. |
|
health
|
|
|
policy
|
|
|
v1
Package v1 is a generated GoMock package.
|
Package v1 is a generated GoMock package. |
|
route
|
|
|
v1
Package v1 is a generated GoMock package.
|
Package v1 is a generated GoMock package. |
|
token
|
|
|
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.