Documentation
¶
Overview ¶
Package clientpolicyx defines outbound microservice call governance.
Server access policy answers: "who may call this RPC?" Downstream policy answers: "how does this service call that downstream safely?" Business code must use Kernel client factories/autowire so timeout, identity propagation, rate limiting, retry, circuit breaker and errorx decoding stay consistent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CircuitBreakerPolicy ¶
CircuitBreakerPolicy controls outbound breaker behavior.
type Deployment ¶
type Deployment struct {
Replicas int
}
Deployment describes topology used for validation.
type DownstreamPolicy ¶
type DownstreamPolicy struct {
Name string
Protocol Protocol
Target string
Timeout time.Duration
RateLimit ratelimitx.Policy
CircuitBreaker CircuitBreakerPolicy
Retry RetryPolicy
ServiceAuth ServiceAuthPolicy
}
DownstreamPolicy is the caller-side contract for one downstream dependency.
func (DownstreamPolicy) Normalize ¶
func (p DownstreamPolicy) Normalize() DownstreamPolicy
Normalize fills safe defaults.
func (DownstreamPolicy) Validate ¶
func (p DownstreamPolicy) Validate(deploy Deployment) error
Validate checks policy semantics and topology-sensitive constraints.
type RetryPolicy ¶
RetryPolicy controls client retries. Only retryable errorx errors or explicit transient transport failures should be retried by runtime middleware.
func (RetryPolicy) Normalize ¶
func (p RetryPolicy) Normalize() RetryPolicy
type ServiceAuthPolicy ¶
ServiceAuthPolicy controls service-to-service identity.