http

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider implements APIProvider for HTTP

func NewProvider

func NewProvider(logger *logrus.Logger) *Provider

NewProvider creates a new HTTP API provider

func (*Provider) Close

func (p *Provider) Close() error

Close closes the HTTP provider

func (*Provider) CloseWebSocket

func (p *Provider) CloseWebSocket(ctx context.Context, request *types.WebSocketRequest) error

CloseWebSocket is not supported by HTTP provider

func (*Provider) Configure

func (p *Provider) Configure(config map[string]interface{}) error

Configure configures the HTTP provider

func (*Provider) Connect

func (p *Provider) Connect(ctx context.Context) error

Connect connects to HTTP service

func (*Provider) ConnectWebSocket

func (p *Provider) ConnectWebSocket(ctx context.Context, request *types.WebSocketRequest) (*types.WebSocketResponse, error)

ConnectWebSocket connects to a WebSocket

func (*Provider) Disconnect

func (p *Provider) Disconnect(ctx context.Context) error

Disconnect disconnects from HTTP service

func (*Provider) GetConnectionInfo

func (p *Provider) GetConnectionInfo() *types.ConnectionInfo

GetConnectionInfo returns connection information

func (*Provider) GetName

func (p *Provider) GetName() string

GetName returns the provider name

func (*Provider) GetStats

func (p *Provider) GetStats(ctx context.Context) (*types.APIStats, error)

GetStats returns HTTP statistics

func (*Provider) GetSupportedFeatures

func (p *Provider) GetSupportedFeatures() []types.APIFeature

GetSupportedFeatures returns supported features

func (*Provider) HealthCheck

func (p *Provider) HealthCheck(ctx context.Context) error

HealthCheck performs a health check on HTTP

func (*Provider) IsConfigured

func (p *Provider) IsConfigured() bool

IsConfigured checks if the provider is configured

func (*Provider) IsConnected

func (p *Provider) IsConnected() bool

IsConnected checks if HTTP is connected

func (*Provider) Ping

func (p *Provider) Ping(ctx context.Context) error

Ping checks HTTP connection

func (*Provider) SendBatch

func (p *Provider) SendBatch(ctx context.Context, request *types.BatchRequest) (*types.BatchResponse, error)

SendBatch sends multiple HTTP requests

func (*Provider) SendGraphQLRequest

func (p *Provider) SendGraphQLRequest(ctx context.Context, request *types.GraphQLRequest) (*types.GraphQLResponse, error)

SendGraphQLRequest sends a GraphQL request

func (*Provider) SendRequest

func (p *Provider) SendRequest(ctx context.Context, request *types.APIRequest) (*types.APIResponse, error)

SendRequest sends an HTTP request

func (*Provider) SendWebSocketMessage

func (p *Provider) SendWebSocketMessage(ctx context.Context, request *types.WebSocketRequest, message interface{}) (*types.WebSocketResponse, error)

SendWebSocketMessage is not supported by HTTP provider

func (*Provider) SendgRPCRequest

func (p *Provider) SendgRPCRequest(ctx context.Context, request *types.GRPCRequest) (*types.GRPCResponse, error)

SendgRPCRequest is not supported by HTTP provider

func (*Provider) StreamRequest

func (p *Provider) StreamRequest(ctx context.Context, request *types.APIRequest, handler types.APIHandler) error

StreamRequest streams an HTTP request

func (*Provider) WebSocketStream

func (p *Provider) WebSocketStream(ctx context.Context, request *types.WebSocketRequest, handler types.WebSocketHandler) error

WebSocketStream is not supported by HTTP provider

Jump to

Keyboard shortcuts

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