pkg/

directory
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: MIT

Directories

Path Synopsis
Package broker defines an asynchronous publish/subscribe abstraction with acknowledgement semantics, modeled after go-micro's Broker.
Package broker defines an asynchronous publish/subscribe abstraction with acknowledgement semantics, modeled after go-micro's Broker.
memory
Package memory provides an in-process broker.Broker for tests and single-node deployments.
Package memory provides an in-process broker.Broker for tests and single-node deployments.
redis
Package redis provides a Redis Streams-backed broker.Broker with at-least-once delivery and explicit Ack.
Package redis provides a Redis Streams-backed broker.Broker with at-least-once delivery and explicit Ack.
Package client provides the stable service-discovery runtime API consumed by generated SDKs: it resolves a service name (e.g.
Package client provides the stable service-discovery runtime API consumed by generated SDKs: it resolves a service name (e.g.
balancer
Package balancer adapts onexmesh's selector to a gRPC balancer so the framework's load-balancing strategies (round_robin, weighted, p2c, ...) are used by the gRPC client instead of grpc's built-in balancers.
Package balancer adapts onexmesh's selector to a gRPC balancer so the framework's load-balancing strategies (round_robin, weighted, p2c, ...) are used by the gRPC client instead of grpc's built-in balancers.
rest
Package rest provides a mesh-aware transport for client-go's rest.Config.
Package rest provides a mesh-aware transport for client-go's rest.Config.
Package codec provides content-type-aware message marshalers for the HTTP transport, supporting JSON and Protobuf bodies.
Package codec provides content-type-aware message marshalers for the HTTP transport, supporting JSON and Protobuf bodies.
Package config provides a layered configuration abstraction inspired by go-micro: Source (data origin) -> Loader (decode + merge) -> Reader (random access) -> Value (typed access).
Package config provides a layered configuration abstraction inspired by go-micro: Source (data origin) -> Loader (decode + merge) -> Reader (random access) -> Value (typed access).
source/file
Package file implements a local-file config.Source with polling-based hot-reload.
Package file implements a local-file config.Source with polling-based hot-reload.
source/polaris
Package polaris implements a config.Source backed by the Polaris config center (github.com/polarismesh/polaris-go).
Package polaris implements a config.Source backed by the Polaris config center (github.com/polarismesh/polaris-go).
core
bytebufferpool
Package bytebufferpool provides a self-calibrating pool of byte buffers, bucketed by capacity, that reduces GC pressure on byte-heavy hot paths such as codec marshaling and broker payload encoding.
Package bytebufferpool provides a self-calibrating pool of byte buffers, bucketed by capacity, that reduces GC pressure on byte-heavy hot paths such as codec marshaling and broker payload encoding.
chain
Package chain provides a generic chain-of-responsibility helper shared by the middleware and resilience packages, which define the same Handler/Middleware decorator shape but over different handler types.
Package chain provides a generic chain-of-responsibility helper shared by the middleware and resilience packages, which define the same Handler/Middleware decorator shape but over different handler types.
collection
Package collection provides concurrency-safe generic collections used by the resilience primitives: a rolling window for time-bucketed statistics and a safe map that avoids the Go map-delete memory-growth issue.
Package collection provides concurrency-safe generic collections used by the resilience primitives: a rolling window for time-bucketed statistics and a safe map that avoids the Go map-delete memory-growth issue.
contextx
Package contextx provides context helpers.
Package contextx provides context helpers.
executors
Package executors provides batching executors that coalesce sporadic tasks into fewer, larger executions: periodical (time-driven), bulk (count-driven), delay (debounced), chunk (byte-size-driven) and less (rate-limited).
Package executors provides batching executors that coalesce sporadic tasks into fewer, larger executions: periodical (time-driven), bulk (count-driven), delay (debounced), chunk (byte-size-driven) and less (rate-limited).
limit
Package limit provides a channel-based semaphore for bounding concurrency.
Package limit provides a channel-based semaphore for bounding concurrency.
mathx
Package mathx provides small numeric helpers used by the core components: a deviation-based jitter around a value and a probabilistic boolean.
Package mathx provides small numeric helpers used by the core components: a deviation-based jitter around a value and a probabilistic boolean.
mr
Package mr provides a generic MapReduce with a bounded worker pool, guarded channel writes and first-error cancellation.
Package mr provides a generic MapReduce with a bounded worker pool, guarded channel writes and first-error cancellation.
stat
Package stat exposes smoothed system-level statistics.
Package stat exposes smoothed system-level statistics.
syncx
Package syncx provides small concurrency primitives used across the core components: a single-flight group with freshness reporting and a spin lock for very short critical sections.
Package syncx provides small concurrency primitives used across the core components: a single-flight group with freshness reporting and a spin lock for very short critical sections.
timex
Package timex provides a Ticker abstraction with a fake implementation for deterministic, clock-injectable tests of periodic logic.
Package timex provides a Ticker abstraction with a fake implementation for deterministic, clock-injectable tests of periodic logic.
Package errno defines framework-level sentinel errors for onexmesh.
Package errno defines framework-level sentinel errors for onexmesh.
Package event provides a lightweight in-process event bus and queue, modeled on kitex's pkg/event.
Package event provides a lightweight in-process event bus and queue, modeled on kitex's pkg/event.
Package metadata provides a canonical map[string]string carried across RPC and message boundaries, plus helpers to attach and read it from a context.
Package metadata provides a canonical map[string]string carried across RPC and message boundaries, plus helpers to attach and read it from a context.
Package middleware defines a protocol-agnostic middleware abstraction that serves both HTTP (gin) and gRPC transports.
Package middleware defines a protocol-agnostic middleware abstraction that serves both HTTP (gin) and gRPC transports.
matcher
Package matcher provides route-level middleware selection: it maps a transport operation (gRPC full method or "METHOD /path") to the middlewares that apply to it, so different endpoints can carry different cross-cutting concerns (e.g.
Package matcher provides route-level middleware selection: it maps a transport operation (gRPC full method or "METHOD /path") to the middlewares that apply to it, so different endpoints can carry different cross-cutting concerns (e.g.
Package options defines the configuration option structs for onexmesh, following the onex IOptions convention: each option implements Validate and AddFlags (with a full prefix), and is combined into a ServerOptions root.
Package options defines the configuration option structs for onexmesh, following the onex IOptions convention: each option implements Validate and AddFlags (with a full prefix), and is combined into a ServerOptions root.
otel
empty
Package empty provides a no-op OpenTelemetry span exporter used to keep the classic output mode uniform (a real TracerProvider with a silent exporter).
Package empty provides a no-op OpenTelemetry span exporter used to keep the classic output mode uniform (a real TracerProvider with a silent exporter).
Package otelslog provides Handler, an slog.Handler implementation, that can be used to bridge between the log/slog API and [OpenTelemetry].
Package otelslog provides Handler, an slog.Handler implementation, that can be used to bridge between the log/slog API and [OpenTelemetry].
proto
Package ratelimit provides local rate-limiting primitives: a token bucket, a leaky bucket, and a concurrency limiter.
Package ratelimit provides local rate-limiting primitives: a token bucket, a leaky bucket, and a concurrency limiter.
store/memory
Package memory provides an in-process ratelimit.Store.
Package memory provides an in-process ratelimit.Store.
store/redis
Package redis provides a Redis-backed ratelimit.Store using atomic Lua scripts, for distributed rate limiting across multiple instances.
Package redis provides a Redis-backed ratelimit.Store using atomic Lua scripts, for distributed rate limiting across multiple instances.
Package registry defines the service registration and discovery abstraction for onexmesh.
Package registry defines the service registration and discovery abstraction for onexmesh.
all
Package all blank-imports every built-in registry backend so their init() functions self-register a registry.Backend (and the legacy registrar/discovery factories).
Package all blank-imports every built-in registry backend so their init() functions self-register a registry.Backend (and the legacy registrar/discovery factories).
cache
Package cache wraps a registry.Discovery with a resilient read-through cache inspired by go-micro's registry cache.
Package cache wraps a registry.Discovery with a resilient read-through cache inspired by go-micro's registry cache.
consul
Package consul implements onexmesh registry.Registrar and registry.Discovery backed by HashiCorp Consul (github.com/hashicorp/consul/api).
Package consul implements onexmesh registry.Registrar and registry.Discovery backed by HashiCorp Consul (github.com/hashicorp/consul/api).
etcd
Package etcd implements onexmesh registry.Registrar and registry.Discovery backed by etcd, using leases for automatic instance expiry (TTL) and prefix watch for change notifications.
Package etcd implements onexmesh registry.Registrar and registry.Discovery backed by etcd, using leases for automatic instance expiry (TTL) and prefix watch for change notifications.
eureka
Package eureka implements onexmesh registry.Registrar and registry.Discovery against a Netflix Eureka server over its REST API, using net/http only.
Package eureka implements onexmesh registry.Registrar and registry.Discovery against a Netflix Eureka server over its REST API, using net/http only.
kubernetes
Package kubernetes implements onexmesh registry.Discovery by discovering Pods through Kubernetes EndpointSlices.
Package kubernetes implements onexmesh registry.Discovery by discovering Pods through Kubernetes EndpointSlices.
nacos
Package nacos implements onexmesh registry.Registrar and registry.Discovery backed by the Nacos service discovery (github.com/nacos-group/nacos-sdk-go).
Package nacos implements onexmesh registry.Registrar and registry.Discovery backed by the Nacos service discovery (github.com/nacos-group/nacos-sdk-go).
polaris
Package polaris implements onexmesh registry.Registrar and registry.Discovery backed by the Polaris service mesh (github.com/polarismesh/polaris-go).
Package polaris implements onexmesh registry.Registrar and registry.Discovery backed by the Polaris service mesh (github.com/polarismesh/polaris-go).
static
Package static implements onexmesh registry.Discovery over a fixed address list, so a client can talk to a known ip:port without a service registry.
Package static implements onexmesh registry.Discovery over a fixed address list, so a client can talk to a known ip:port without a service registry.
Package resilience provides client-side resilience primitives: circuit breaker, retry and timeout, composed as middleware around a Handler.
Package resilience provides client-side resilience primitives: circuit breaker, retry and timeout, composed as middleware around a Handler.
Package resiliency provides declarative, configuration-driven resilience policies (timeouts, retries and circuit breakers) bound to service endpoints, modeled after Dapr's resiliency policy model.
Package resiliency provides declarative, configuration-driven resilience policies (timeouts, retries and circuit breakers) bound to service endpoints, modeled after Dapr's resiliency policy model.
Package selector provides pluggable load-balancing over a set of nodes, with optional result feedback via DoneFunc so strategies can adapt to per-node health (strategy pattern + feedback loop).
Package selector provides pluggable load-balancing over a set of nodes, with optional result feedback via DoneFunc so strategies can adapt to per-node health (strategy pattern + feedback loop).
p2c
Package p2c implements a power-of-two-choices selector with time-decayed EWMA latency and success tracking, inspired by go-zero's p2c_ewma.
Package p2c implements a power-of-two-choices selector with time-decayed EWMA latency and success tracking, inspired by go-zero's p2c_ewma.
random
Package random provides a uniformly random selector.
Package random provides a uniformly random selector.
roundrobin
Package roundrobin provides a round-robin selector.
Package roundrobin provides a round-robin selector.
weighted
Package weighted provides a weight-aware random selector.
Package weighted provides a weight-aware random selector.
Package server defines the server lifecycle abstraction and concrete HTTP (gin) and gRPC servers, wired to service registration for graceful deregister-before-stop.
Package server defines the server lifecycle abstraction and concrete HTTP (gin) and gRPC servers, wired to service registration for graceful deregister-before-stop.
Package transport provides a protocol-agnostic abstraction that unifies HTTP and gRPC request/response metadata.
Package transport provides a protocol-agnostic abstraction that unifies HTTP and gRPC request/response metadata.
Package version provides build version information, injected via ldflags.
Package version provides build version information, injected via ldflags.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL