Documentation ¶
Index ¶
- func IsError(output string) (isErr bool, err error)
- type Config
- func (c *Config) Error() (*Config, error)
- func (c *Config) GetGRPCConn(host, port string) (*grpc.ClientConn, error)
- func (c *Config) Healthz(ctx context.Context, service string) (string, error)
- func (c *Config) HealthzGRPC(ctx context.Context, service string) (string, error)
- func (c *Config) HealthzHTTP(service string) (string, error)
- func (c *Config) RunGRPCnRESTFunc(name string, firstTry bool, fnGRPC ProtoFunc, fnREST ProtoFunc) (string, error)
- func (c *Config) WithHTTP(host, httpPort, healthzPort string)
- func (c *Config) WithTLS(certDir, certFile, keyFile, caFile string) error
- type ProtoFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { APIVersion string Host string Logger *log.Logger GrpcPort string GrpcConn *grpc.ClientConn HTTPClient *http.Client HTTPBaseURL *url.URL HTTPHealthzClient *http.Client HTTPHealthzBaseURL *url.URL Insecure bool Certificate tls.Certificate CertPool *x509.CertPool // contains filtered or unexported fields }
Config is the kubekit client configuration
func (*Config) GetGRPCConn ¶
func (c *Config) GetGRPCConn(host, port string) (*grpc.ClientConn, error)
GetGRPCConn create a gRPC connection to the given host:port
func (*Config) HealthzGRPC ¶
HealthzGRPC returns the Health Status using gRPC
func (*Config) HealthzHTTP ¶
HealthzHTTP returns the Health Status using HTTP/REST
func (*Config) RunGRPCnRESTFunc ¶
func (c *Config) RunGRPCnRESTFunc(name string, firstTry bool, fnGRPC ProtoFunc, fnREST ProtoFunc) (string, error)
RunGRPCnRESTFunc execute the given functions to access the GRPC and REST API
Click to show internal directories.
Click to hide internal directories.