Documentation ¶
Overview ¶
Package proxy provides functionality for handling proxies.
Index ¶
- func SetupCA(ctx context.Context, logger *zap.Logger) error
- type Conn
- type MockManager
- func (m *MockManager) DeleteFilteredMock(mock *models.Mock) bool
- func (m *MockManager) DeleteUnFilteredMock(mock *models.Mock) bool
- func (m *MockManager) FlagMockAsUsed(mock *models.Mock) error
- func (m *MockManager) GetConsumedMocks() []string
- func (m *MockManager) GetFilteredMocks() ([]*models.Mock, error)
- func (m *MockManager) GetUnFilteredMocks() ([]*models.Mock, error)
- func (m *MockManager) SetFilteredMocks(mocks []*models.Mock)
- func (m *MockManager) SetUnFilteredMocks(mocks []*models.Mock)
- func (m *MockManager) UpdateUnFilteredMock(old *models.Mock, new *models.Mock) bool
- type Option
- type Proxy
- func (p *Proxy) GetConsumedMocks(_ context.Context, id uint64) ([]string, error)
- func (p *Proxy) InitIntegrations(_ context.Context) error
- func (p *Proxy) Mock(_ context.Context, id uint64, opts models.OutgoingOptions) error
- func (p *Proxy) Record(_ context.Context, id uint64, mocks chan<- *models.Mock, ...) error
- func (p *Proxy) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
- func (p *Proxy) SetMocks(_ context.Context, id uint64, filtered []*models.Mock, ...) error
- func (p *Proxy) StartProxy(ctx context.Context, opts core.ProxyOptions) error
- func (p *Proxy) StopProxyServer(ctx context.Context)
- type TreeDb
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockManager ¶
type MockManager struct {
// contains filtered or unexported fields
}
func NewMockManager ¶
func NewMockManager(filtered, unfiltered *TreeDb, logger *zap.Logger) *MockManager
func (*MockManager) DeleteFilteredMock ¶
func (m *MockManager) DeleteFilteredMock(mock *models.Mock) bool
func (*MockManager) DeleteUnFilteredMock ¶
func (m *MockManager) DeleteUnFilteredMock(mock *models.Mock) bool
func (*MockManager) FlagMockAsUsed ¶
func (m *MockManager) FlagMockAsUsed(mock *models.Mock) error
func (*MockManager) GetConsumedMocks ¶
func (m *MockManager) GetConsumedMocks() []string
func (*MockManager) GetFilteredMocks ¶
func (m *MockManager) GetFilteredMocks() ([]*models.Mock, error)
func (*MockManager) GetUnFilteredMocks ¶
func (m *MockManager) GetUnFilteredMocks() ([]*models.Mock, error)
func (*MockManager) SetFilteredMocks ¶
func (m *MockManager) SetFilteredMocks(mocks []*models.Mock)
func (*MockManager) SetUnFilteredMocks ¶
func (m *MockManager) SetUnFilteredMocks(mocks []*models.Mock)
func (*MockManager) UpdateUnFilteredMock ¶
type Proxy ¶
type Proxy struct { IP4 string IP6 string Port uint32 DNSPort uint32 DestInfo core.DestInfo Integrations map[string]integrations.Integrations MockManagers sync.Map Listener net.Listener UDPDNSServer *dns.Server TCPDNSServer *dns.Server // contains filtered or unexported fields }
func (*Proxy) GetConsumedMocks ¶
GetConsumedMocks returns the consumed filtered mocks for a given app id
func (*Proxy) StartProxy ¶
func (*Proxy) StopProxyServer ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package integrations provides functionality for integrating different types of services.
|
Package integrations provides functionality for integrating different types of services. |
generic
Package generic provides functionality for decoding generic dependencies.
|
Package generic provides functionality for decoding generic dependencies. |
grpc
Package grpc provides functionality for integrating with gRPC outgoing calls.
|
Package grpc provides functionality for integrating with gRPC outgoing calls. |
http
Package http provides functionality for handling HTTP outgoing calls.
|
Package http provides functionality for handling HTTP outgoing calls. |
mongo
Package mongo provides functionality for working with MongoDB outgoing calls.
|
Package mongo provides functionality for working with MongoDB outgoing calls. |
mysql
Package mysql provides integration with MySQL outgoing.
|
Package mysql provides integration with MySQL outgoing. |
postgres/v1
Package v1 provides functionality for decoding Postgres requests and responses.
|
Package v1 provides functionality for decoding Postgres requests and responses. |
scram
Package scram provides functionality for SCRAM authentication.
|
Package scram provides functionality for SCRAM authentication. |
util
Package util provides utility functions for the integration package.
|
Package util provides utility functions for the integration package. |
Package util provides utility functions for the proxy package.
|
Package util provides utility functions for the proxy package. |
Click to show internal directories.
Click to hide internal directories.