Documentation ¶
Overview ¶
hexagonconfig contains code for generating hexagon configs with common compositions such as chain, fanout, and funnel
Index ¶
- Constants
- func GenerateChain(commonConfigs []CommonConfig) []v1.ServiceUnitConfig
- func GenerateFanout(commonConfigs []CommonConfig, fanoutDegree uint64) []v1.ServiceUnitConfig
- func GenerateFunnel(trunkConfig, leafConfig CommonConfig, funnelDegrees uint64) []v1.ServiceUnitConfig
- func NewDefaultDeploymentSpec() v1.DeploymentSpec
- func NewLeafService(version string, tier, index uint64) v1.ServiceUnitConfig
- func NewTrunkOrBranchService(version string, tier, index uint64, isEdge bool, fanout uint64, ...) v1.ServiceUnitConfig
- type CommonConfig
Constants ¶
View Source
const ( DEFAULT_GET_ROUTE = "get" DEFAULT_GW_ROUTE = "gateway" )
Variables ¶
This section is empty.
Functions ¶
func GenerateChain ¶
func GenerateChain(commonConfigs []CommonConfig) []v1.ServiceUnitConfig
GenerateChain generates ServiceUnitConfigs for chain topology of given tiers.
func GenerateFanout ¶ added in v1.1.1
func GenerateFanout(commonConfigs []CommonConfig, fanoutDegree uint64) []v1.ServiceUnitConfig
GenerateFanout generates ServiceUnitConfigs for fanout topology of given tiers. []CommonConfig should contain configs for each tier. Note that it is not for each service. so leaves will have same config for example.
func GenerateFunnel ¶ added in v1.1.1
func GenerateFunnel(trunkConfig, leafConfig CommonConfig, funnelDegrees uint64) []v1.ServiceUnitConfig
GenerateFunnel generates ServiceUnitConfigs for funnel topology of given degree. []CommonConfig should contain configs for each tier. Note that it is not for each service. so leaves will have same config for example.
func NewDefaultDeploymentSpec ¶
func NewDefaultDeploymentSpec() v1.DeploymentSpec
deployment:
replicas: 1 resources: limits: cpu: 500m memory: 1Gi requests: cpu: 500m memory: 1Gi
func NewLeafService ¶
func NewLeafService(version string, tier, index uint64) v1.ServiceUnitConfig
- server: action: get variant: rest route: get tasks:
- adapter: stressor: name: cpu-stressor variant: cpu iters: 500 threads: 2 resiliency: # callTimeout: "2.5ms" # no timeout # taskTimeout: "1s" # no timeout retry: disabled: true circuitBreaker: disabled: true
func NewTrunkOrBranchService ¶
func NewTrunkOrBranchService(version string, tier, index uint64, isEdge bool, fanout uint64, timeout time.Duration, adaptiveTimeout v1.AdaptiveTimeoutSpec) v1.ServiceUnitConfig
adapters:
- server: action: read variant: rest route: get tasks:
- adapter: stressor: name: cpu-stressor variant: cpu iters: 2 threads: 1
- adapter: invocation: variant: rest service: NEXT BRANCH OR LEAF action: get route: get resiliency: isCritical: true callTimeout: {{ .Timeout }} adaptiveCallTimeout: rto: {{ .RTO }} min: 1ms max: {{ .MaxTimeout }} slo: {{ .SLO }} capacity: {{ .Capacity }} interval: {{ .Interval }} kMargin: {{ .KMargin }} retry: disabled: true circuitBreaker: disabled: true
Types ¶
type CommonConfig ¶
type CommonConfig struct { Version string Timeout time.Duration AdaptiveTimeout v1.AdaptiveTimeoutSpec }
Click to show internal directories.
Click to hide internal directories.