Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
onexmeshctl
command
onexmeshctl is the CLI tool for the OneXMesh microservice framework.
|
onexmeshctl is the CLI tool for the OneXMesh microservice framework. |
|
protoc-gen-errno
command
Command protoc-gen-errno is a protoc plugin that turns a proto enum into a semantic error catalog, one constructor per value.
|
Command protoc-gen-errno is a protoc plugin that turns a proto enum into a semantic error catalog, one constructor per value. |
|
protoc-gen-onexmesh
command
Command protoc-gen-onexmesh is a protoc plugin that generates HTTP route descriptors for a service whose methods carry the onexmesh.v1.http annotation (see pkg/proto/onexmesh/v1/http.proto).
|
Command protoc-gen-onexmesh is a protoc plugin that generates HTTP route descriptors for a service whose methods carry the onexmesh.v1.http annotation (see pkg/proto/onexmesh/v1/http.proto). |
|
protoc-gen-onexmesh-client
command
protoc-gen-onexmesh-client is a plugin for the protocol buffer compiler that generates a client-go style REST SDK (clientset + typed clients + scheme + fake + informers + listers + applyconfigurations) from protobuf IDL, plus a mesh-aware gRPC client for services flagged with onexmesh.v1.mesh_service.
|
protoc-gen-onexmesh-client is a plugin for the protocol buffer compiler that generates a client-go style REST SDK (clientset + typed clients + scheme + fake + informers + listers + applyconfigurations) from protobuf IDL, plus a mesh-aware gRPC client for services flagged with onexmesh.v1.mesh_service. |
|
protoc-gen-onexmesh-client/internal/generators
Package generators holds the code generators that produce the client-go style REST SDK.
|
Package generators holds the code generators that produce the client-go style REST SDK. |
|
protoc-gen-onexmesh-client/internal/generators/applycfg
Package applycfg generates per-version apply configuration types (<Kind>ApplyConfiguration) that power server-side apply through the gentype ClientWithListAndApply / FakeClientWithListAndApply variants.
|
Package applycfg generates per-version apply configuration types (<Kind>ApplyConfiguration) that power server-side apply through the gentype ClientWithListAndApply / FakeClientWithListAndApply variants. |
|
protoc-gen-onexmesh-client/internal/generators/fake
Package fake generates the fake clientset and fake typed clients, enabling in-memory CRUD for testing (mirroring k8s.io/client-go's fake package).
|
Package fake generates the fake clientset and fake typed clients, enabling in-memory CRUD for testing (mirroring k8s.io/client-go's fake package). |
|
protoc-gen-onexmesh-client/internal/generators/informer
Package informer generates the informers/ subtree (factory, group/version interfaces, per-resource informers) in the client-go style.
|
Package informer generates the informers/ subtree (factory, group/version interfaces, per-resource informers) in the client-go style. |
|
protoc-gen-onexmesh-client/internal/generators/lister
Package lister generates listers/<group>/<version>/<kind>.go and the expansion interfaces, in the client-go style (backed by k8s.io/client-go/listers.ResourceIndexer).
|
Package lister generates listers/<group>/<version>/<kind>.go and the expansion interfaces, in the client-go style (backed by k8s.io/client-go/listers.ResourceIndexer). |
|
protoc-gen-onexmesh-client/internal/generators/mesh
Package mesh renders the onexmesh service-discovery client for a gRPC service, generated only when the file declares onexmesh.v1.mesh_service.
|
Package mesh renders the onexmesh service-discovery client for a gRPC service, generated only when the file declares onexmesh.v1.mesh_service. |
|
protoc-gen-onexmesh-client/internal/generators/meta
Package meta generates the zz_generated.meta.go adapter that makes a generated proto message satisfy runtime.Object and metav1.Object, the type constraints required by k8s.io/client-go/gentype.
|
Package meta generates the zz_generated.meta.go adapter that makes a generated proto message satisfy runtime.Object and metav1.Object, the type constraints required by k8s.io/client-go/gentype. |
|
protoc-gen-onexmesh-client/internal/generators/register
Package register generates zz_generated.register.go, which registers the resource types of a group/version into a runtime.Scheme (mirroring the output of k8s.io/code-generator's register-gen).
|
Package register generates zz_generated.register.go, which registers the resource types of a group/version into a runtime.Scheme (mirroring the output of k8s.io/code-generator's register-gen). |
|
protoc-gen-onexmesh-client/internal/generators/scheme
Package scheme generates the clientset scheme/register.go, which aggregates the AddToScheme of every group/version into a single runtime.Scheme.
|
Package scheme generates the clientset scheme/register.go, which aggregates the AddToScheme of every group/version into a single runtime.Scheme. |
|
protoc-gen-onexmesh-client/internal/generators/templates
Package templates renders the client-go style SDK source from the spec IR via text/template.
|
Package templates renders the client-go style SDK source from the spec IR via text/template. |
|
protoc-gen-onexmesh-client/internal/generators/typed
Package typed generates the clientset, per-group client and per-resource typed client files in the client-go style (gentype-backed).
|
Package typed generates the clientset, per-group client and per-resource typed client files in the client-go style (gentype-backed). |
|
protoc-gen-onexmesh-client/internal/spec
Package spec defines the intermediate representation consumed by all generators.
|
Package spec defines the intermediate representation consumed by all generators. |
|
examples
|
|
|
helloworld/client
command
helloworld-client discovers the Greeter service by name and calls it over both gRPC and HTTP (Protobuf body).
|
helloworld-client discovers the Greeter service by name and calls it over both gRPC and HTTP (Protobuf body). |
|
helloworld/server
command
helloworld-server 演示 OneXMesh 的「protobuf IDL 驱动的 gRPC + Gin 统一」:
|
helloworld-server 演示 OneXMesh 的「protobuf IDL 驱动的 gRPC + Gin 统一」: |
|
pkg/generated/exampleclient/scheme
Package scheme contains the scheme for this clientset.
|
Package scheme contains the scheme for this clientset. |
|
pkg
|
|
|
broker
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. |
|
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. |
|
broker/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. |
|
client
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. |
|
client/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. |
|
client/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. |
|
codec
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. |
|
config
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). |
|
config/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. |
|
config/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. |
|
core/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. |
|
core/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. |
|
core/contextx
Package contextx provides context helpers.
|
Package contextx provides context helpers. |
|
core/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). |
|
core/limit
Package limit provides a channel-based semaphore for bounding concurrency.
|
Package limit provides a channel-based semaphore for bounding concurrency. |
|
core/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. |
|
core/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. |
|
core/stat
Package stat exposes smoothed system-level statistics.
|
Package stat exposes smoothed system-level statistics. |
|
core/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. |
|
core/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. |
|
errno
Package errno defines framework-level sentinel errors for onexmesh.
|
Package errno defines framework-level sentinel errors for onexmesh. |
|
event
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. |
|
metadata
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. |
|
middleware
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. |
|
middleware/matcher
Package matcher provides route-level middleware selection: it maps a transport operation 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 to the middlewares that apply to it, so different endpoints can carry different cross-cutting concerns (e.g. |
|
options
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). |
|
otelslog
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]. |
|
ratelimit
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. |
|
ratelimit/store/memory
Package memory provides an in-process ratelimit.Store.
|
Package memory provides an in-process ratelimit.Store. |
|
ratelimit/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. |
|
registry
Package registry defines the service registration and discovery abstraction for onexmesh.
|
Package registry defines the service registration and discovery abstraction for onexmesh. |
|
registry/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). |
|
registry/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. |
|
registry/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). |
|
registry/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. |
|
registry/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. |
|
registry/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. |
|
registry/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). |
|
registry/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). |
|
registry/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. |
|
resilience
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. |
|
resiliency
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. |
|
selector
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). |
|
selector/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. |
|
selector/random
Package random provides a uniformly random selector.
|
Package random provides a uniformly random selector. |
|
selector/roundrobin
Package roundrobin provides a round-robin selector.
|
Package roundrobin provides a round-robin selector. |
|
selector/weighted
Package weighted provides a weight-aware random selector.
|
Package weighted provides a weight-aware random selector. |
|
server
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. |
|
transport
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. |
|
version
Package version provides build version information, injected via ldflags.
|
Package version provides build version information, injected via ldflags. |
Click to show internal directories.
Click to hide internal directories.