proxy

package
v0.0.0-...-0cfaaa3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *Config) *Client

NewCLient creates a new client

func (*Client) Load

func (c *Client) Load(ctx context.Context, data interface{}, batchID string, options ...loader.Option) error

type Collector

type Collector struct {
	collector.Collector
	// contains filtered or unexported fields
}

func (*Collector) CollectAll

func (c *Collector) CollectAll(source interface{}, from, to int, errors *shared.Errors, wg *sync.WaitGroup)

func (*Collector) SliceLen

func (c *Collector) SliceLen(source interface{}) int

type Config

type Config struct {
	Endpoint      Endpoint
	MaxCollectors int
}

type Content

type Content struct {
	CompressionSizeKb int
}

func (*Content) CompressionSize

func (c *Content) CompressionSize() int

type Endpoint

type Endpoint struct {
	URL                 string
	MaxIdleConnections  int `json:"MaxIdleConnections"`
	MaxIdleConnsPerHost int `json:"MaxIdleConnsPerHost"`

	IdleConnTimeoutMs int `json:"IdleConnTimeoutMs"`

	RequestTimeoutMs int `json:"RequestTimeoutMs"`

	ResponseHeaderTimeoutMs int `json:"ResponseHeaderTimeoutMs"`

	KeepAliveTimeMs int `json:"KeepAliveTimeMs"`

	Content Content
	// contains filtered or unexported fields
}

func (*Endpoint) IdleConnTimeout

func (e *Endpoint) IdleConnTimeout() time.Duration

func (*Endpoint) Init

func (e *Endpoint) Init()

func (*Endpoint) KeepAliveTime

func (e *Endpoint) KeepAliveTime() time.Duration

func (*Endpoint) RequestTimeout

func (e *Endpoint) RequestTimeout() time.Duration

func (*Endpoint) ResponseHeaderTimeout

func (e *Endpoint) ResponseHeaderTimeout() time.Duration

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(targetSliceType reflect.Type, collectors ...collector.Collector) *Handler

func (*Handler) Handle

func (h *Handler) Handle(data []byte) error

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type Request

type Request struct {
	BatchID string
	Records interface{}
}

func (*Request) IsNil

func (r *Request) IsNil() bool

IsNil checks if instance is nil

func (*Request) MarshalJSONObject

func (r *Request) MarshalJSONObject(enc *gojay.Encoder)

MarshalJSONObject implements MarshalerJSONObject

func (*Request) NKeys

func (r *Request) NKeys() int

NKeys returns the number of keys to unmarshal

func (*Request) UnmarshalJSONObject

func (r *Request) UnmarshalJSONObject(dec *gojay.Decoder, k string) error

UnmarshalJSONObject implements gojay's UnmarshalerJSONObject

type Response

type Response struct {
	Status string
	Error  string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL