Documentation ¶
Index ¶
- func CompareSQLStrings(actual, expected string) error
- func PortForward(restConfig *rest.Config, options PortForwardOptions) (localPort uint16, closer func(), err error)
- type ClickHouseServer
- func (c *ClickHouseServer) CreateDatabase(ctx context.Context, dbName string) error
- func (c *ClickHouseServer) DropDatabase(ctx context.Context, dbName string) error
- func (c *ClickHouseServer) GetConnection() (driver.Conn, error)
- func (c *ClickHouseServer) GetDSN() string
- func (c *ClickHouseServer) Run(ctx context.Context, sqlString string) error
- type PortForwardOptions
- type ProgrammableHTTPServer
- func (phs *ProgrammableHTTPServer) GetRequests(method, path string) []*http.Request
- func (phs *ProgrammableHTTPServer) ServerURL() string
- func (phs *ProgrammableHTTPServer) SetResponse(method, path string, status int, body string)
- func (phs *ProgrammableHTTPServer) SetResponseFunc(method, path string, f func(*http.Request) (int, string))
- func (phs *ProgrammableHTTPServer) Start()
- func (phs *ProgrammableHTTPServer) Stop()
- type ReplyT
- type SyncBuffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareSQLStrings ¶
For two SQL strings, this function does a line-by-line comparison while also normalizing any whitespace to avoid auto-formatting differences such as the usage of tabs vs spaces which can vary across development setups across contributors/developers.
Returns no error if they're equal, fails with an error otherwise.
func PortForward ¶
func PortForward(restConfig *rest.Config, options PortForwardOptions) (localPort uint16, closer func(), err error)
PortForward will try to configure a port-forward proxy for the given opts. Returns the local port number, closer function and an error. The closer must be used to shut down the proxy, but will not block.
Types ¶
type ClickHouseServer ¶
type ClickHouseServer struct { Host string Port string DSN string Container testcontainers.Container `json:"-"` }
func NewClickHouseServer ¶
func NewClickHouseServer(ctx context.Context) (*ClickHouseServer, error)
func (*ClickHouseServer) CreateDatabase ¶
func (c *ClickHouseServer) CreateDatabase(ctx context.Context, dbName string) error
func (*ClickHouseServer) DropDatabase ¶
func (c *ClickHouseServer) DropDatabase(ctx context.Context, dbName string) error
func (*ClickHouseServer) GetConnection ¶
func (c *ClickHouseServer) GetConnection() (driver.Conn, error)
func (*ClickHouseServer) GetDSN ¶
func (c *ClickHouseServer) GetDSN() string
type PortForwardOptions ¶
type PortForwardOptions struct { // LocalPort for forwarding. 0 picks a random free port. LocalPort uint16 // RemotePort for forwarding. Must match a service or pod port. RemotePort uint16 // Namespace to target. Namespace string // Resource type/name such as deployment/foo or pod/foo. // Can be a service name. Resource string // contains filtered or unexported fields }
func (PortForwardOptions) ToDiscoveryClient ¶
func (o PortForwardOptions) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
func (PortForwardOptions) ToRESTConfig ¶
func (o PortForwardOptions) ToRESTConfig() (*rest.Config, error)
func (PortForwardOptions) ToRESTMapper ¶
func (o PortForwardOptions) ToRESTMapper() (meta.RESTMapper, error)
func (PortForwardOptions) ToRawKubeConfigLoader ¶
func (o PortForwardOptions) ToRawKubeConfigLoader() clientcmd.ClientConfig
type ProgrammableHTTPServer ¶
type ProgrammableHTTPServer struct {
// contains filtered or unexported fields
}
func NewProgrammableHTTPServer ¶
func NewProgrammableHTTPServer( logger *uberzap.SugaredLogger, credentials string, ) *ProgrammableHTTPServer
func (*ProgrammableHTTPServer) GetRequests ¶
func (phs *ProgrammableHTTPServer) GetRequests(method, path string) []*http.Request
func (*ProgrammableHTTPServer) ServerURL ¶
func (phs *ProgrammableHTTPServer) ServerURL() string
func (*ProgrammableHTTPServer) SetResponse ¶
func (phs *ProgrammableHTTPServer) SetResponse(method, path string, status int, body string)
func (*ProgrammableHTTPServer) SetResponseFunc ¶
func (*ProgrammableHTTPServer) Start ¶
func (phs *ProgrammableHTTPServer) Start()
func (*ProgrammableHTTPServer) Stop ¶
func (phs *ProgrammableHTTPServer) Stop()
type SyncBuffer ¶
type SyncBuffer struct {
// contains filtered or unexported fields
}
func (*SyncBuffer) String ¶
func (s *SyncBuffer) String() string
Click to show internal directories.
Click to hide internal directories.