Documentation ¶
Index ¶
- Variables
- func AssignLocalAddr() (*net.TCPAddr, error)
- func InitMatcher()
- func StoreTmp(inboundAddr net.TCPAddr, session *ReplayingSession)
- type AppendFile
- type CallFromInbound
- type CallFunction
- type CallOutbound
- type ChunkMatcher
- type MatcherIf
- type ReplayedAction
- type ReplayedSession
- type ReplayingSession
- func (replayingSession *ReplayingSession) AppendFile(ctx context.Context, content []byte, fileName string)
- func (replayingSession *ReplayingSession) CallFunction(ctx context.Context, content []byte)
- func (replayingSession *ReplayingSession) CallOutbound(ctx context.Context, callOutbound *CallOutbound)
- func (replayingSession *ReplayingSession) Finish(response []byte) *ReplayedSession
- func (replayingSession *ReplayingSession) ReturnFunction(ctx context.Context, content []byte)
- func (replayingSession *ReplayingSession) SendUDP(ctx context.Context, content []byte, peer net.UDPAddr)
- type ReturnFunction
- type ReturnInbound
- type SendUDP
- type SimMatcher
Constants ¶
This section is empty.
Variables ¶
View Source
var MatchThreshold float64
Functions ¶
func AssignLocalAddr ¶
func InitMatcher ¶
func InitMatcher()
func StoreTmp ¶
func StoreTmp(inboundAddr net.TCPAddr, session *ReplayingSession)
Types ¶
type AppendFile ¶
func (*AppendFile) GetActionId ¶
func (action *AppendFile) GetActionId() string
func (*AppendFile) GetActionType ¶
func (action *AppendFile) GetActionType() string
func (*AppendFile) GetOccurredAt ¶
func (action *AppendFile) GetOccurredAt() int64
func (*AppendFile) MarshalJSON ¶
func (appendFile *AppendFile) MarshalJSON() ([]byte, error)
type CallFromInbound ¶
type CallFromInbound struct { OriginalRequestTime int64 OriginalRequest []byte // contains filtered or unexported fields }
func (*CallFromInbound) GetActionId ¶
func (action *CallFromInbound) GetActionId() string
func (*CallFromInbound) GetActionType ¶
func (action *CallFromInbound) GetActionType() string
func (*CallFromInbound) GetOccurredAt ¶
func (action *CallFromInbound) GetOccurredAt() int64
func (*CallFromInbound) MarshalJSON ¶
func (callFromInbound *CallFromInbound) MarshalJSON() ([]byte, error)
type CallFunction ¶
type CallFunction struct { CallIntoFile string CallIntoLine int FuncName string Args []interface{} // contains filtered or unexported fields }
func (*CallFunction) GetActionId ¶
func (action *CallFunction) GetActionId() string
func (*CallFunction) GetActionType ¶
func (action *CallFunction) GetActionType() string
func (*CallFunction) GetOccurredAt ¶
func (action *CallFunction) GetOccurredAt() int64
type CallOutbound ¶
type CallOutbound struct { MatchedRequest []byte MatchedResponse []byte MatchedActionIndex int MatchedMark float64 Request []byte Peer net.TCPAddr // contains filtered or unexported fields }
func NewCallOutbound ¶
func NewCallOutbound(peer net.TCPAddr, request []byte) *CallOutbound
func (*CallOutbound) GetActionId ¶
func (action *CallOutbound) GetActionId() string
func (*CallOutbound) GetActionType ¶
func (action *CallOutbound) GetActionType() string
func (*CallOutbound) GetOccurredAt ¶
func (action *CallOutbound) GetOccurredAt() int64
func (*CallOutbound) MarshalJSON ¶
func (callOutbound *CallOutbound) MarshalJSON() ([]byte, error)
type ChunkMatcher ¶
type ChunkMatcher struct { }
func (ChunkMatcher) DoMatch ¶
func (matchOther ChunkMatcher) DoMatch(ctx context.Context, connLastMatchedIndex int, request []byte, replayingSession *ReplayingSession) (int, float64, *recording.CallOutbound)
type MatcherIf ¶
type MatcherIf interface {
DoMatch(ctx context.Context, connLastMatchedIndex int, request []byte, replayingSession *ReplayingSession) (int, float64, *recording.CallOutbound)
}
var Matcher MatcherIf
type ReplayedAction ¶
type ReplayedSession ¶
type ReplayedSession struct { SessionId string CallFromInbound *CallFromInbound ReturnInbound *ReturnInbound Actions []ReplayedAction }
type ReplayingSession ¶
type ReplayingSession struct { SessionId string CallFromInbound *recording.CallFromInbound ReturnInbound *recording.ReturnInbound CallOutbounds []*recording.CallOutbound RedirectDirs map[string]string MockFiles map[string][]byte TracePaths []string // contains filtered or unexported fields }
func NewReplayingSession ¶
func NewReplayingSession() *ReplayingSession
func RetrieveTmp ¶
func RetrieveTmp(inboundAddr net.TCPAddr) *ReplayingSession
func (*ReplayingSession) AppendFile ¶
func (replayingSession *ReplayingSession) AppendFile(ctx context.Context, content []byte, fileName string)
func (*ReplayingSession) CallFunction ¶
func (replayingSession *ReplayingSession) CallFunction(ctx context.Context, content []byte)
func (*ReplayingSession) CallOutbound ¶
func (replayingSession *ReplayingSession) CallOutbound(ctx context.Context, callOutbound *CallOutbound)
func (*ReplayingSession) Finish ¶
func (replayingSession *ReplayingSession) Finish(response []byte) *ReplayedSession
func (*ReplayingSession) ReturnFunction ¶
func (replayingSession *ReplayingSession) ReturnFunction(ctx context.Context, content []byte)
type ReturnFunction ¶
type ReturnFunction struct { CallFunctionId string ReturnValue interface{} // contains filtered or unexported fields }
func (*ReturnFunction) GetActionId ¶
func (action *ReturnFunction) GetActionId() string
func (*ReturnFunction) GetActionType ¶
func (action *ReturnFunction) GetActionType() string
func (*ReturnFunction) GetOccurredAt ¶
func (action *ReturnFunction) GetOccurredAt() int64
type ReturnInbound ¶
type ReturnInbound struct { OriginalResponse []byte Response []byte // contains filtered or unexported fields }
func (*ReturnInbound) GetActionId ¶
func (action *ReturnInbound) GetActionId() string
func (*ReturnInbound) GetActionType ¶
func (action *ReturnInbound) GetActionType() string
func (*ReturnInbound) GetOccurredAt ¶
func (action *ReturnInbound) GetOccurredAt() int64
func (*ReturnInbound) MarshalJSON ¶
func (returnInbound *ReturnInbound) MarshalJSON() ([]byte, error)
type SendUDP ¶
func (*SendUDP) GetActionId ¶
func (action *SendUDP) GetActionId() string
func (*SendUDP) GetActionType ¶
func (action *SendUDP) GetActionType() string
func (*SendUDP) GetOccurredAt ¶
func (action *SendUDP) GetOccurredAt() int64
func (*SendUDP) MarshalJSON ¶
type SimMatcher ¶
type SimMatcher struct { }
func (SimMatcher) DoMatch ¶
func (matchSim SimMatcher) DoMatch(ctx context.Context, connLastMatchedIndex int, request []byte, replayingSession *ReplayingSession) (int, float64, *recording.CallOutbound)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.