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 the MySQL integration.
|
Package mysql provides the MySQL integration. |
mysql/recorder
Package recorder is used to record the MySQL traffic between the client and the server.
|
Package recorder is used to record the MySQL traffic between the client and the server. |
mysql/replayer
Package replayer is used to mock the MySQL traffic between the client and the server.
|
Package replayer is used to mock the MySQL traffic between the client and the server. |
mysql/utils
Package utils provides utility functions for MySQL packets
|
Package utils provides utility functions for MySQL packets |
mysql/wire
Package wire provides encoding and decoding operation of MySQL packets.
|
Package wire provides encoding and decoding operation of MySQL packets. |
mysql/wire/phase
Package phase contains the encoding and decoding functions for the different phases of the MySQL protocol.
|
Package phase contains the encoding and decoding functions for the different phases of the MySQL protocol. |
mysql/wire/phase/conn
Package conn provides decoding and encoding of connection phase mysql packets
|
Package conn provides decoding and encoding of connection phase mysql packets |
mysql/wire/phase/query
Package query provides functions to decode MySQL command phase packets.
|
Package query provides functions to decode MySQL command phase packets. |
mysql/wire/phase/query/preparedstmt
Package preparedstmt provides functionality for decoding prepared statement packets.
|
Package preparedstmt provides functionality for decoding prepared statement packets. |
mysql/wire/phase/query/rowscols
Package rowscols provides encoding and decoding of MySQL row & column packets.
|
Package rowscols provides encoding and decoding of MySQL row & column packets. |
mysql/wire/phase/query/utility
Package utility provides encoding and decoding of utility command packets.
|
Package utility provides encoding and decoding of utility command packets. |
postgres/v1
Package v1 provides functionality for decoding Postgres requests and responses.
|
Package v1 provides functionality for decoding Postgres requests and responses. |
redis
Package redis is the decode point for the redis application.
|
Package redis is the decode point for the redis application. |
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.