Documentation ¶
Index ¶
Constants ¶
const ( // Name of the driver Name = "pwx" // Type of the driver Type = api.DriverType_DRIVER_TYPE_BLOCK // DefaultUrl where the driver's socket resides DefaultUrl = "unix:///" + volume.DriverAPIBase + "pxd.sock" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionParamsBuilder ¶
type ConnectionParamsBuilder struct { Config *ConnectionParamsBuilderConfig // contains filtered or unexported fields }
ConnectionParamsBuilder contains dependencies needed for building Dial options and endpoints to SDK/iSDK and legacy REST API connections
func NewConnectionParamsBuilder ¶
func NewConnectionParamsBuilder(ops core.Ops, params *ConnectionParamsBuilderConfig) (*ConnectionParamsBuilder, error)
NewConnectionParamsBuilder constructor function to create ConnectionParamsBuilder with needed dependencies
func (*ConnectionParamsBuilder) BuildClientsEndpoints ¶
func (cpb *ConnectionParamsBuilder) BuildClientsEndpoints() (string, string, error)
BuildClientsEndpoints returns two endpoints for PX MGMT API and gRPC SDK/iSDL API
func (*ConnectionParamsBuilder) BuildDialOps ¶
func (cpb *ConnectionParamsBuilder) BuildDialOps() ([]grpc.DialOption, error)
BuildDialOps build slice of grpc.DialOption to connect to SDK API
type ConnectionParamsBuilderConfig ¶
type ConnectionParamsBuilderConfig struct { // DefaultServiceName is the default name of the Portworx service DefaultServiceName string // DefaultServiceNamespaceName is the kubernetes namespace in which Portworx daemon set runs DefaultServiceNamespaceName string // DefaultRestPortName is name of Porx legacy REST API port in service DefaultRestPortName string // DefaultSDKPortName is name of Porx SDK/iSDK API port in service DefaultSDKPortName string // DefaultTokenIssuer is the default value for token issuer DefaultTokenIssuer string // Environment variables names to get values config properties EnableTLSEnv string // NamespaceNameEnv is used to set environment variable name which should be read to fetch Porx namespace NamespaceNameEnv string // ServiceNameEnv is used to set environment variable name which should be read to fetch Porx service ServiceNameEnv string // CaCertSecretEnv is used to set environment variable name which should be read to fetch secret // containing certificate used for protecting Porx APIs CaCertSecretEnv string CaCertSecretKeyEnv string // TokenIssuerEnv is used to set environment variable name which should be read to fetch the token issuer TokenIssuerEnv string // StaticEndpointEnv can be used to overwrite Porx endpoint StaticEndpointEnv string // StaticSDKPortEnv can be used to overwrite Porx SDK port StaticSDKPortEnv string // StaticRestPortEnv can be used to overwrite Porx Legacy Rest API port StaticRestPortEnv string // if AuthEnabled is set to true params builder generates additional dial option which injects authorization token AuthEnabled bool // AuthTokenGen function need to be used to generate Authorization token AuthTokenGenerator func() (string, error) }
ConnectionParamsBuilderConfig contains default values for all PX legacy rest API and SDk API connections also can be used for redefining names of Env variables which are used for external configuration
func NewConnectionParamsBuilderDefaultConfig ¶
func NewConnectionParamsBuilderDefaultConfig() *ConnectionParamsBuilderConfig
NewConnectionParamsBuilderDefaultConfig returns ConnectionParamsBuilderConfig with default values set