Documentation ¶
Index ¶
- Constants
- func Main(ctx context.Context, config Config) error
- func NewTargeterGenerator(config Config, newUIID func() uuid.UUID, out chan<- ce.Event) vegeta.Targeter
- func StartReceiver(ctx context.Context, config ReceiverConfig, received chan<- ce.Event) error
- type Config
- type Metrics
- type OrderedConfig
- type ReceiverConfig
- type ReceiverFaultConfig
- type Report
- type SenderConfig
- type StateManager
- func (s *StateManager) Diff() string
- func (s *StateManager) GenerateReport() Report
- func (s *StateManager) ReadReceived(received <-chan ce.Event) <-chan struct{}
- func (s *StateManager) ReadSent(sent <-chan ce.Event) <-chan struct{}
- func (s *StateManager) ReceivedCount() int
- func (s *StateManager) Terminated(metrics Metrics)
- type StateManagerConfig
Constants ¶
View Source
const (
BenchmarkTimestampAttribute = "benchmarktimestamp"
)
View Source
const CloudEventIdHeader = "Cloudevent-Id"
Variables ¶
This section is empty.
Functions ¶
func NewTargeterGenerator ¶
func StartReceiver ¶
Types ¶
type Config ¶
type Config struct { Sender SenderConfig `json:"sender" yaml:"sender"` Receiver ReceiverConfig `json:"receiver" yaml:"receiver"` Duration string `json:"duration" yaml:"duration"` Ordered *OrderedConfig `json:"ordered" yaml:"ordered"` ParsedDuration time.Duration }
type Metrics ¶
type OrderedConfig ¶
type OrderedConfig struct {
NumPartitionKeys uint8 `json:"numPartitionKeys" yaml:"numPartitionKeys"`
}
type ReceiverConfig ¶
type ReceiverConfig struct { Port int `json:"port" yaml:"port"` Timeout string `json:"timeout" yaml:"timeout"` MaxDuplicatesPercentage *int `json:"maxDuplicatesPercentage" yaml:"maxDuplicatesPercentage"` IncludeRemoteAddressLabel *bool `json:"includeRemoteAddressLabel" yaml:"includeRemoteAddressLabel"` ReceiverFaultConfig *ReceiverFaultConfig `json:"fault" yaml:"fault"` ParsedTimeout time.Duration }
type ReceiverFaultConfig ¶
type ReceiverFaultConfig struct { // MinSleepDuration is the minimum duration to sleep before sending the response. // // When MinSleepDuration is specified, MaxSleepDuration must be specified. MinSleepDuration *time.Duration `json:"minSleepDuration" yaml:"minSleepDuration"` // MaxSleepDuration is the maximum duration to sleep before sending the response. MaxSleepDuration *time.Duration `json:"maxSleepDuration" yaml:"maxSleepDuration"` }
type Report ¶
type Report struct { LostCount int `json:"lostCount"` LostEventsByPartitionKey map[string][]string `json:"lostEvents"` DuplicateCount int `json:"duplicateCount"` // DuplicateEventsByPartitionKey collects duplicate events by DuplicateEventsByPartitionKey map[string][]string `json:"duplicateEvents"` // ReceivedCount is the number of events received, including duplicates ReceivedCount int `json:"receivedCount"` // ReceivedEventsByPartitionKey collects all events by partition, including duplicates ReceivedEventsByPartitionKey map[string][]string `json:"-"` Terminated bool `json:"terminated"` Metrics Metrics `json:"metrics"` }
type SenderConfig ¶
type StateManager ¶
type StateManager struct {
// contains filtered or unexported fields
}
func NewStateManager ¶
func NewStateManager(config Config) *StateManager
func (*StateManager) Diff ¶
func (s *StateManager) Diff() string
func (*StateManager) GenerateReport ¶
func (s *StateManager) GenerateReport() Report
func (*StateManager) ReadReceived ¶
func (s *StateManager) ReadReceived(received <-chan ce.Event) <-chan struct{}
func (*StateManager) ReadSent ¶
func (s *StateManager) ReadSent(sent <-chan ce.Event) <-chan struct{}
func (*StateManager) ReceivedCount ¶
func (s *StateManager) ReceivedCount() int
func (*StateManager) Terminated ¶
func (s *StateManager) Terminated(metrics Metrics)
type StateManagerConfig ¶
type StateManagerConfig struct { Ordered bool OrderedConfig }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.