httpclient

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package httpclient implements HTTP client initialization and message processing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient struct {
	IP           string
	Port         string
	WriteTimeout time.Duration
	ReadTimeout  time.Duration
	// contains filtered or unexported fields
}

HTTPClient is structure used to init HttpClient

func NewHTTPClient

func NewHTTPClient(dic *di.Container) *HTTPClient

NewHTTPClient initializes a new Http client instance

func (*HTTPClient) Init

func (hc *HTTPClient) Init(c config.Config) error

Init is a method to construct HTTP server

func (*HTTPClient) Receive

func (hc *HTTPClient) Receive(c config.Config) (interface{}, error)

Receive http server start listen

func (*HTTPClient) Send

func (hc *HTTPClient) Send(message interface{}) error

Send no messages need to be sent

func (*HTTPClient) UnInit

func (hc *HTTPClient) UnInit()

UnInit is a method to close http server

Jump to

Keyboard shortcuts

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