proxy

package
v0.0.0-...-7627a42 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package proxy is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient interface {
	Do(req *fasthttp.Request, resp *fasthttp.Response) error
}

type MockHTTPClient

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

MockHTTPClient is a mock of HTTPClient interface.

func NewMockHTTPClient

func NewMockHTTPClient(ctrl *gomock.Controller) *MockHTTPClient

NewMockHTTPClient creates a new mock instance.

func (*MockHTTPClient) Do

Do mocks base method.

func (*MockHTTPClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockHTTPClientMockRecorder

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

MockHTTPClientMockRecorder is the mock recorder for MockHTTPClient.

func (*MockHTTPClientMockRecorder) Do

func (mr *MockHTTPClientMockRecorder) Do(req, resp interface{}) *gomock.Call

Do indicates an expected call of Do.

type MockPool

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

MockPool is a mock of Pool interface.

func NewMockPool

func NewMockPool(ctrl *gomock.Controller) *MockPool

NewMockPool creates a new mock instance.

func (*MockPool) Close

func (m *MockPool) Close()

Close mocks base method.

func (*MockPool) EXPECT

func (m *MockPool) EXPECT() *MockPoolMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPool) Get

func (m *MockPool) Get() (HTTPClient, error)

Get mocks base method.

func (*MockPool) Len

func (m *MockPool) Len() int

Len mocks base method.

func (*MockPool) Put

func (m *MockPool) Put(arg0 HTTPClient) error

Put mocks base method.

type MockPoolMockRecorder

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

MockPoolMockRecorder is the mock recorder for MockPool.

func (*MockPoolMockRecorder) Close

func (mr *MockPoolMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockPoolMockRecorder) Get

func (mr *MockPoolMockRecorder) Get() *gomock.Call

Get indicates an expected call of Get.

func (*MockPoolMockRecorder) Len

func (mr *MockPoolMockRecorder) Len() *gomock.Call

Len indicates an expected call of Len.

func (*MockPoolMockRecorder) Put

func (mr *MockPoolMockRecorder) Put(arg0 interface{}) *gomock.Call

Put indicates an expected call of Put.

type Pool

type Pool interface {
	// Get returns a new ReverseProxy from the pool.
	Get() (HTTPClient, error)

	// Put the ReverseProxy puts it back to the Pool.
	Put(HTTPClient) error

	// Close closes the pool and all its connections. After Close() the pool is
	// no longer usable.
	Close()

	// Len returns the current number of connections of the pool.
	Len() int
}

func NewChanPool

func NewChanPool(initialCap, maxCap int, hostAddr string, server *config.Server) (Pool, error)

NewChanPool to new a pool with some params

Jump to

Keyboard shortcuts

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