Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventTypeAddressCreated = "ADDRESS_CREATED" EventTypeCustomerCreated = "CUSTOMER_CREATED" EventTypeCustomerModified = "CUSTOMER_MODIFIED" EventTypeCustomerDeleted = "CUSTOMER_DELETED" EventTypeCustomerConsumed = "CUSTOMER_CONSUMED" EventTypeOrderCreated = "ORDER_CREATED" EventTypeFrontendEventCreated = "FRONTEND_EVENT_CREATED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressService ¶
type AddressService struct {
// contains filtered or unexported fields
}
func NewAddressService ¶
func NewAddressService(cfg Config, logger *zap.Logger) (*AddressService, error)
func (*AddressService) CreateAddress ¶
func (svc *AddressService) CreateAddress()
func (*AddressService) Initialize ¶
func (svc *AddressService) Initialize(ctx context.Context) error
func (*AddressService) Start ¶
func (svc *AddressService) Start()
type Config ¶
type Config struct { Kafka kafka.Config `yaml:"kafka"` Traffic ConfigTraffic `yaml:"traffic"` // Prefix for all topic names, consumer group names, client ids etc. GlobalPrefix string `yaml:"globalPrefix"` }
func (*Config) RegisterFlags ¶
RegisterFlags for all (sub)configs
func (*Config) SetDefaults ¶
func (c *Config) SetDefaults()
type ConfigTraffic ¶
type ConfigTraffic struct { Pattern string `yaml:"pattern"` Interval ConfigTrafficInterval `yaml:"interval"` }
func (*ConfigTraffic) SetDefaults ¶
func (c *ConfigTraffic) SetDefaults()
func (*ConfigTraffic) Validate ¶
func (c *ConfigTraffic) Validate() error
type ConfigTrafficInterval ¶
type ConfigTrafficInterval struct { // Number of requests per configured interval duration Rate int `yaml:"rate"` // Duration in which all requests shall be issued Duration time.Duration `yaml:"duration"` }
func (*ConfigTrafficInterval) SetDefaults ¶
func (c *ConfigTrafficInterval) SetDefaults()
func (*ConfigTrafficInterval) Validate ¶
func (c *ConfigTrafficInterval) Validate() error
type CustomerService ¶
type CustomerService struct {
// contains filtered or unexported fields
}
func NewCustomerService ¶
func NewCustomerService(cfg Config, logger *zap.Logger) (*CustomerService, error)
func (*CustomerService) CreateCustomer ¶
func (svc *CustomerService) CreateCustomer()
func (*CustomerService) DeleteCustomer ¶
func (svc *CustomerService) DeleteCustomer()
func (*CustomerService) Initialize ¶
func (svc *CustomerService) Initialize(ctx context.Context) error
func (*CustomerService) ModifyCustomer ¶
func (svc *CustomerService) ModifyCustomer()
type FrontendService ¶
type FrontendService struct {
// contains filtered or unexported fields
}
func NewFrontendService ¶
func NewFrontendService(cfg Config, logger *zap.Logger) (*FrontendService, error)
func (*FrontendService) CreateFrontendEvent ¶
func (svc *FrontendService) CreateFrontendEvent()
func (*FrontendService) Initialize ¶
func (svc *FrontendService) Initialize(ctx context.Context) error
type OrderService ¶
type OrderService struct {
// contains filtered or unexported fields
}
func NewOrderService ¶
func NewOrderService(cfg Config, logger *zap.Logger) (*OrderService, error)
func (*OrderService) CreateOrder ¶
func (svc *OrderService) CreateOrder()
func (*OrderService) Initialize ¶
func (svc *OrderService) Initialize(ctx context.Context) error
func (*OrderService) Start ¶
func (svc *OrderService) Start()
type Shop ¶
type Shop struct {
// contains filtered or unexported fields
}
func (*Shop) SimulatePageImpression ¶
func (s *Shop) SimulatePageImpression()
SimulatePageImpression simulates a user visiting a page in our imaginary owl shop. This page impression can be a user registration, oder, viewing articles or doing anything else a common user would do in a shop.
type TrafficPattern ¶
type TrafficPattern = string
const (
TrafficPatternConstant TrafficPattern = "constant"
)
Click to show internal directories.
Click to hide internal directories.