Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) BasicAuth() string
- func (c *Client) Close()
- func (c *Client) Do(req *http.Request) (*http.Response, error)
- func (c *Client) Get(ctx context.Context, url string) (*http.Response, error)
- func (c *Client) GetUrl(endpoint string) string
- func (c *Client) Post(ctx context.Context, url, contentType string, body io.Reader) (*http.Response, error)
- type Credentials
- type HTTPClient
- type HTTPClientFactory
- type Options
- type Transport
- type TransportFactory
Constants ¶
View Source
const ( DefaultIdleConnTimeout = 10 * time.Second DefaultBaseUrl = "http://localhost:8088" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
The ksqlDB client
func NewHTTPClient ¶
NewHTTPClient creates a new http client
type Credentials ¶
type Credentials struct { Username string `json:"username" mapstructure:"username"` Password string `json:"password" mapstructure:"password"` }
Credentials holds the username and password
type HTTPClient ¶
type HTTPClientFactory ¶
type Options ¶
type Options struct { // BaseUrl is the URL to your ksqldb server BaseUrl string // Credentials for BaseAuth remote user Credentials Credentials // AllowHTTP AllowHTTP bool // DisableKeepAlives see https://golang.org/pkg/net/http/#Transport.DisableKeepAlives DisableKeepAlives bool // DisableCompression see https://golang.org/pkg/net/http/#Transport.DisableCompression DisableCompression bool // ForceAttemptHTTP2 see https://golang.org/pkg/net/http/#Transport.ForceAttemptHTTP2 ForceAttemptHTTP2 bool // MaxIdleConns see https://golang.org/pkg/net/http/#Transport.MaxIdleConns MaxIdleConns int // MaxIdleConnsPerHost see https://golang.org/pkg/net/http/#Transport.MaxIdleConnsPerHost MaxIdleConnsPerHost int // MaxConnsPerHost see https://golang.org/pkg/net/http/#Transport.MaxConnsPerHost MaxConnsPerHost int // WriteBufferSize see https://golang.org/pkg/net/http/#Transport.WriteBufferSize WriteBufferSize int // ReadBufferSize see https://golang.org/pkg/net/http/#Transport.ReadBufferSize ReadBufferSize int // MaxResponseHeaderBytes see // https://golang.org/pkg/net/http/#Transport.MaxResponseHeaderBytes MaxResponseHeaderBytes int64 // Timeout sets all Timeouts, that are set to 0 to the given // value. Basically it's the default timeout value. Timeout time.Duration // TLSHandshakeTimeout see // https://golang.org/pkg/net/http/#Transport.TLSHandshakeTimeout, // if not set or set to 0, its using Options.Timeout. TLSHandshakeTimeout time.Duration // IdleConnTimeout see // https://golang.org/pkg/net/http/#Transport.IdleConnTimeout, // if not set or set to 0, its using Options.Timeout. IdleConnTimeout time.Duration // ResponseHeaderTimeout see // https://golang.org/pkg/net/http/#Transport.ResponseHeaderTimeout, // if not set or set to 0, its using Options.Timeout. ResponseHeaderTimeout time.Duration // ExpectContinueTimeout see // https://golang.org/pkg/net/http/#Transport.ExpectContinueTimeout, // if not set or set to 0, its using Options.Timeout. ExpectContinueTimeout time.Duration // Tracer instance, can be nil to not enable tracing Tracer opentracing.Tracer // OpentracingComponentTag sets component tag for all requests OpentracingComponentTag string // OpentracingSpanName sets span name for all requests OpentracingSpanName string }
Options configures the Client
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport wraps an http.Transport and adds support for tracing and http2.
func NewTransport ¶
NewTransport creates a new Transport with Options
func WithComponentTag ¶
WithComponentTag sets the component name, if you have an enabled tracing Transport.
func WithSpanName ¶
WithSpanName sets the name of the span, if you have an enabled tracing Transport.
type TransportFactory ¶
Click to show internal directories.
Click to hide internal directories.