Documentation ¶
Overview ¶
Package faker implement a fake telemetry generator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
Replicas int `json:"replicas" yaml:"replicas"`
}
API represents API service configuration.
API service acts as an entrypoint and handles requests from clients, proxying them to Backend.
type Backend ¶
type Backend struct {
Replicas int `json:"replicas" yaml:"replicas"`
}
Backend handles requests from API service.
Backend service is used to process user requests from API. Handles business logic and uses database and cache services.
type Cache ¶
type Cache struct {
Replicas int `json:"replicas" yaml:"replicas"`
}
Cache represents cache service configuration.
Cache service is used by [Backend]for short term data storage with fast access.
Example: Redis.
type Config ¶
type Config struct { // Number of nodes. Nodes int `json:"nodes" yaml:"nodes"` // Number of requests per second. RPS int `json:"rps" yaml:"rps"` // Services configuration. Services Services `json:"services" yaml:"services"` // Random number generator. Rand *rand.Rand // Factory for TracerProvider that can create providers from new TracerProviderFactory TracerProviderFactory // Factory for MeterProvider that can create providers from new MeterProviderFactory MeterProviderFactory }
Config models a single cluster of multiple nodes, where services are deployed on each node.
Services are interacting with each other, generating telemetry.
Multiple clients are modeled, sending requests to the services.
type DB ¶
type DB struct {
Replicas int `json:"replicas" yaml:"replicas"`
}
DB represents database service configuration.
type Frontend ¶
type Frontend struct {
Replicas int `json:"replicas" yaml:"replicas"`
}
Frontend represents user web client configuration.
Frontend service sends requests to API on behalf of the user.
type MeterProviderFactory ¶ added in v0.1.0
type MeterProviderFactory interface {
New(...metric.Option) *metric.MeterProvider
}
MeterProviderFactory is a factory for MeterProvider.
type Router ¶
type Router interface { Frontend(ctx context.Context) API(ctx context.Context) Backend(ctx context.Context) Cache(ctx context.Context) DB(ctx context.Context) }
Router routes request to services.
type Services ¶
type Services struct { API API `json:"api" yaml:"api"` Backend Backend `json:"backend" yaml:"backend"` Frontend Frontend `json:"frontend" yaml:"frontend"` DB DB `json:"db" yaml:"db"` Cache Cache `json:"cache" yaml:"cache"` }
Services wraps all services configuration, describing topology of the cluster and load.
type TracerProviderFactory ¶ added in v0.1.0
type TracerProviderFactory interface {
New(...tracesdk.TracerProviderOption) *tracesdk.TracerProvider
}
TracerProviderFactory is a factory for TracerProvider.