Documentation ¶
Index ¶
- func NewCloudCluster(bundlePath string) (*gocql.ClusterConfig, error)
- type AuthInfo
- type ConnectionConfig
- func (cc *ConnectionConfig) GetClientCertificate() (*tls.Certificate, error)
- func (cc *ConnectionConfig) GetCurrentAuthInfo() (*AuthInfo, error)
- func (cc *ConnectionConfig) GetCurrentContextConfig() (*Context, error)
- func (cc *ConnectionConfig) GetCurrentDatacenterConfig() (*Datacenter, error)
- func (cc *ConnectionConfig) GetDatacenterCAPool(datacenterName string) (*x509.CertPool, error)
- func (cc *ConnectionConfig) GetInitialContactPoints() []string
- func (cc *ConnectionConfig) GetRootCAPool() (*x509.CertPool, error)
- type ConsistencyString
- type Context
- type Datacenter
- type Parameters
- type SniHostDialer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCloudCluster ¶
Types ¶
type AuthInfo ¶
type AuthInfo struct { // ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificatePath. // +optional ClientCertificateData []byte `json:"clientCertificateData,omitempty"` // ClientCertificatePath is the path to a client cert file for TLS. // +optional ClientCertificatePath string `json:"clientCertificatePath,omitempty"` // ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKeyPath. // +optional ClientKeyData []byte `json:"clientKeyData,omitempty"` // ClientKeyPath is the path to a client key file for TLS. // +optional ClientKeyPath string `json:"clientKeyPath,omitempty"` // Username is the username for basic authentication to the Scylla cluster. // +optional Username string `json:"username,omitempty"` // Password is the password for basic authentication to the Scylla cluster. // +optional ` Password string `json:"password,omitempty"` }
type ConnectionConfig ¶
type ConnectionConfig struct { // Kind is a string value representing the REST resource this object represents. // Servers may infer this from the endpoint the client submits requests to. // In CamelCase. // +optional Kind string `json:"kind,omitempty"` // APIVersion defines the versioned schema of this representation of an object. // Servers should convert recognized schemas to the latest internal value, and // may reject unrecognized values. // +optional APIVersion string `json:"apiVersion,omitempty"` // Datacenters is a map of referencable names to datacenter configs. Datacenters map[string]*Datacenter `json:"datacenters"` // AuthInfos is a map of referencable names to authentication configs. AuthInfos map[string]*AuthInfo `json:"authInfos"` // Contexts is a map of referencable names to context configs. Contexts map[string]*Context `json:"contexts"` // CurrentContext is the name of the context that you would like to use by default. CurrentContext string `json:"currentContext"` // Parameters is a struct containing common driver configuration parameters. // +optional Parameters *Parameters `json:"parameters,omitempty"` }
func (*ConnectionConfig) GetClientCertificate ¶
func (cc *ConnectionConfig) GetClientCertificate() (*tls.Certificate, error)
func (*ConnectionConfig) GetCurrentAuthInfo ¶
func (cc *ConnectionConfig) GetCurrentAuthInfo() (*AuthInfo, error)
func (*ConnectionConfig) GetCurrentContextConfig ¶
func (cc *ConnectionConfig) GetCurrentContextConfig() (*Context, error)
func (*ConnectionConfig) GetCurrentDatacenterConfig ¶
func (cc *ConnectionConfig) GetCurrentDatacenterConfig() (*Datacenter, error)
func (*ConnectionConfig) GetDatacenterCAPool ¶
func (cc *ConnectionConfig) GetDatacenterCAPool(datacenterName string) (*x509.CertPool, error)
func (*ConnectionConfig) GetInitialContactPoints ¶
func (cc *ConnectionConfig) GetInitialContactPoints() []string
func (*ConnectionConfig) GetRootCAPool ¶
func (cc *ConnectionConfig) GetRootCAPool() (*x509.CertPool, error)
type ConsistencyString ¶
type ConsistencyString string
const ( DefaultAnyConsistency ConsistencyString = "ANY" DefaultOneConsistency ConsistencyString = "ONE" DefaultTwoConsistency ConsistencyString = "TWO" DefaultThreeConsistency ConsistencyString = "THREE" DefaultQuorumConsistency ConsistencyString = "QUORUM" DefaultAllConsistency ConsistencyString = "ALL" DefaultLocalQuorumConsistency ConsistencyString = "LOCAL_QUORUM" DefaultEachQuorumConsistency ConsistencyString = "EACH_QUORUM" DefaultSerialConsistency ConsistencyString = "SERIAL" DefaultLocalSerialConsistency ConsistencyString = "LOCAL_SERIAL" DefaultLocalOneConsistency ConsistencyString = "LOCAL_ONE" )
just AnyConsistency etc is better, but there's already SerialConsistency defined elsewhere.
type Datacenter ¶
type Datacenter struct { // CertificateAuthorityPath is the path to a cert file for the certificate authority. // +optional CertificateAuthorityPath string `json:"certificateAuthorityPath,omitempty"` // CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority. // +optional CertificateAuthorityData []byte `json:"certificateAuthorityData,omitempty"` // Server is the initial contact point of the Scylla cluster. // Example: https://hostname:port Server string `json:"server"` // TLSServerName is used to check server certificates. If TLSServerName is empty, the hostname used to contact the server is used. // +optional TLSServerName string `json:"tlsServerName,omitempty"` // NodeDomain the domain suffix that is concatenated with host_id of the node driver wants to connect to. // Example: host_id.<nodeDomain> NodeDomain string `json:"nodeDomain"` // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure. // +optional InsecureSkipTLSVerify bool `json:"insecureSkipTlsVerify,omitempty"` // ProxyURL is the URL to the proxy to be used for all requests made by this // client. URLs with "http", "https", and "socks5" schemes are supported. If // this configuration is not provided or the empty string, the client // attempts to construct a proxy configuration from http_proxy and // https_proxy environment variables. If these environment variables are not // set, the client does not attempt to proxy requests. // +optional ProxyURL string `json:"proxyUrl,omitempty"` }
type Parameters ¶
type Parameters struct { // DefaultConsistency is the default consistency level used for user queries. // +optional DefaultConsistency ConsistencyString `json:"defaultConsistency,omitempty"` // DefaultSerialConsistency is the default consistency level for the serial part of user queries. // +optional DefaultSerialConsistency ConsistencyString `json:"defaultSerialConsistency,omitempty"` }
type SniHostDialer ¶
type SniHostDialer struct {
// contains filtered or unexported fields
}
SniHostDialer is able to dial particular host through SNI proxy. TLS Config is build from ConnectionConfig based on datacenter where given node belongs. SNI is constructed from host_id of a node, and NodeDomain taken from cloud config.
func NewSniHostDialer ¶
func NewSniHostDialer(connConfig *ConnectionConfig, dialer gocql.Dialer) *SniHostDialer
Click to show internal directories.
Click to hide internal directories.