Versions in this module Expand all Collapse all v3 v3.0.2 Dec 6, 2024 v3.0.1 Nov 25, 2024 Changes in this version + const DFLT_BACKOFF_MAX + const DFLT_RETRY_MAX + func ExecuteTask(tloc *TRSHTTPLocal, tct taskChannelTuple) + func SendDelayedError(tct taskChannelTuple, logger *logrus.Logger) + type ClientPolicy struct + Retry RetryPolicy + Tx HttpTxPolicy + type HttpKafkaRx struct + Err *error + ID uuid.UUID + Response *SerializedResponse + type HttpKafkaTx struct + CPolicy ClientPolicy + ID uuid.UUID + Ignore bool + Request SerializedRequest + ServiceName string + TimeStamp string + Timeout time.Duration + func (tx HttpKafkaTx) ToHttpTask() (ht HttpTask) + type HttpTask struct + CPolicy ClientPolicy + Err *error + Ignore bool + Request *http.Request + ServiceName string + TimeStamp string + Timeout time.Duration + func (ht *HttpTask) GetID() (uuid uuid.UUID) + func (ht *HttpTask) SetIDIfNotPopulated() uuid.UUID + func (ht HttpTask) ToHttpKafkaRx() (rx HttpKafkaRx) + func (ht HttpTask) ToHttpKafkaTx() (tx HttpKafkaTx) + func (ht HttpTask) Validate() (valid bool, err error) + type HttpTxPolicy struct + DisableKeepAlives bool + Enabled bool + IdleConnTimeout time.Duration + MaxIdleConns int + MaxIdleConnsPerHost int + ResponseHeaderTimeout time.Duration + TLSHandshakeTimeout time.Duration + type RetryPolicy struct + BackoffTimeout time.Duration + Retries int + type SerializedRequest struct + Body []byte + Close bool + ContentLength int64 + Form url.Values + Header http.Header + Host string + Method string + MultipartForm *multipart.Form + PostForm url.Values + Proto string + ProtoMajor int + ProtoMinor int + RemoteAddr string + RequestURI string + TLS *tls.ConnectionState + Trailer http.Header + TransferEncoding []string + URL *url.URL + func ToSerializedRequest(req http.Request) (sr SerializedRequest) + func (sr SerializedRequest) Equal(sr1 SerializedRequest) (equal bool) + func (sr SerializedRequest) ToHttpRequest() (req http.Request) + type SerializedResponse struct + Body []byte + Close bool + ContentLength int64 + Header http.Header + Proto string + ProtoMajor int + ProtoMinor int + Status string + StatusCode int + TLS *tls.ConnectionState + Trailer http.Header + TransferEncoding []string + Uncompressed bool + func ToSerializedResponse(resp http.Response) (sr SerializedResponse) + func (sr SerializedResponse) Equal(sr1 SerializedResponse) (equal bool) + func (sr SerializedResponse) ToHttpResponse() (resp http.Response) + type TRSHTTPLocal struct + CACertPool *x509.CertPool + ClientCert tls.Certificate + Logger *logrus.Logger + func (tloc *TRSHTTPLocal) Alive() (bool, error) + func (tloc *TRSHTTPLocal) Cancel(taskList *[]HttpTask) + func (tloc *TRSHTTPLocal) Check(taskList *[]HttpTask) (bool, error) + func (tloc *TRSHTTPLocal) Cleanup() + func (tloc *TRSHTTPLocal) Close(taskList *[]HttpTask) + func (tloc *TRSHTTPLocal) CreateTaskList(source *HttpTask, numTasks int) []HttpTask + func (tloc *TRSHTTPLocal) Init(serviceName string, logger *logrus.Logger) error + func (tloc *TRSHTTPLocal) Launch(taskList *[]HttpTask) (chan *HttpTask, error) + func (tloc *TRSHTTPLocal) SetSecurity(inParams interface{}) error + type TRSHTTPLocalSecurity struct + CACertBundleData string + ClientCertData string + ClientKeyData string + type TRSHTTPRemote struct + KafkaInstance *tkafka.TRSKafka + Logger *logrus.Logger + func (tloc *TRSHTTPRemote) Alive() (bool, error) + func (tloc *TRSHTTPRemote) Cancel(taskList *[]HttpTask) + func (tloc *TRSHTTPRemote) Check(taskList *[]HttpTask) (bool, error) + func (tloc *TRSHTTPRemote) Cleanup() + func (tloc *TRSHTTPRemote) Close(taskList *[]HttpTask) + func (tloc *TRSHTTPRemote) CreateTaskList(source *HttpTask, numTasks int) []HttpTask + func (tloc *TRSHTTPRemote) Init(serviceName string, logger *logrus.Logger) error + func (tloc *TRSHTTPRemote) Launch(taskList *[]HttpTask) (chan *HttpTask, error) + func (tloc *TRSHTTPRemote) SetSecurity(inParams interface{}) error + type TrsAPI interface + Alive func() (ok bool, err error) + Cancel func(taskList *[]HttpTask) + Check func(taskList *[]HttpTask) (running bool, err error) + Cleanup func() + Close func(taskList *[]HttpTask) + CreateTaskList func(source *HttpTask, numTasks int) []HttpTask + Init func(serviceName string, logger *logrus.Logger) error + Launch func(taskList *[]HttpTask) (chan *HttpTask, error) + SetSecurity func(params interface{}) error Other modules containing this package github.com/Cray-HPE/hms-trs-app-api github.com/Cray-HPE/hms-trs-app-api/v2