MCPcopy
hub / github.com/cloudwego/kitex

github.com/cloudwego/kitex @v0.16.2 sqlite

repository ↗ · DeepWiki ↗ · release v0.16.2 ↗
8,767 symbols 40,065 edges 752 files 3,829 documented · 44%
README

CloudWeGo-Kitex

English | 中文

Release WebSite License Go Report Card OpenIssue ClosedIssue Stars Forks

Kitex [kaɪt'eks] is a high-performance and strong-extensibility Go RPC framework that helps developers build microservices. If the performance and extensibility are the main concerns when you develop microservices, Kitex can be a good choice.

Basic Features

  • High Performance

Kitex integrates Netpoll, a high-performance network library, which offers a significant performance advantage over go net.

  • Extensibility

Kitex provides many interfaces with default implementations for users to customize. You can extend or inject them into Kitex to fulfill your needs (please refer to the framework extension section below).

  • Multi-message Protocol

Kitex is designed to be extensible to support multiple RPC messaging protocols. The initial release contains support for Thrift, Kitex Protobuf and gRPC, in which Kitex Protobuf is a Kitex custom Protobuf messaging protocol with a protocol format similar to Thrift. Kitex also supports developers extending their own messaging protocols.

  • Multi-transport Protocol

For service governance, Kitex supports TTHeader and HTTP2. TTHeader can be used in conjunction with Thrift and Kitex Protobuf.

  • Multi-message Type

Kitex supports PingPong, One-way, and Bidirectional Streaming. Among them, One-way currently only supports Thrift protocol.

  • Service Governance

Kitex integrates service governance modules such as service registry, service discovery, load balancing, circuit breaker, rate limiting, retry, monitoring, tracing, logging, diagnosis, etc. Most of these have been provided with default extensions, giving users the option to integrate them as desired.

  • Code Generation

Kitex has built-in code generation tools that support generating Thrift, Protobuf, and scaffold code.

Documentation

  • Getting Started

  • User Guide

  • Basic Features

    Including Message Type, Supported Protocols, Directly Invoke, Connection Pool, Timeout Control, Request Retry, LoadBalancer, Circuit Breaker, Rate Limiting, Instrumentation Control, Logging and HttpResolver.[more]

  • Governance Features

    Supporting Service Discovery, Monitoring, Tracing and Customized Access Control.[more]

  • Advanced Features

    Supporting Generic Call and Server SDK Mode.[more]

  • Code Generation

    Including Code Generation Tool and Combined Service.[more]

  • Framework Extension

    Providing Middleware Extensions, Suite Extensions, Service Registry, Service Discovery, Customize LoadBalancer, Monitoring, Logging, Codec, Transport Module, Transport Pipeline, Metadata Transparent Transmission, Diagnosis Module.[more]

  • Reference

  • For Transport Protocol, Exception Instruction and Version Specification, please refer to doc.

  • Best Practice

  • Kitex best practices in production, such as graceful shutdown, error handling, and integration testing. More

  • FAQ

  • Please refer to FAQ.

Performance

Performance benchmark can only provide a limited reference. In production, there are many factors that can affect actual performance.

We provide the kitex-benchmark project to track and compare the performance of Kitex and other frameworks under different conditions for reference.

Related Projects

  • Netpoll: A high-performance network library.
  • kitex-contrib: A partial extension library of Kitex, which users can integrate into Kitex through options according to their needs.
  • kitex-examples: Examples of Kitex showcasing various features.
  • biz-demo: Business demos using Kitex.

Blogs

Contributing

Contributor guide: Contributing.

License

Kitex is distributed under the Apache License, version 2.0. The licenses of third party dependencies of Kitex are explained here.

Community

LarkGroup

Landscapes

  

CloudWeGo enriches the CNCF CLOUD NATIVE Landscape.

Extension points exported contracts — how you extend this code

Dialer (Interface)
Dialer is used to dial and get a connection. [6 implementers]
pkg/remote/dialer.go
KitexArgs (Interface)
KitexArgs is used for assert when get real request from XXXArgs. Thrift and KitexProtobuf will generate GetFirstArgument [13 …
pkg/utils/interface.go
RateLimiter (Interface)
RateLimiter limits the access rate towards the protected resource. [8 implementers]
pkg/limiter/limiter.go
Picker (Interface)
Picker picks an instance for next RPC call. [28 implementers]
pkg/loadbalance/loadbalancer.go
Generic (Interface)
Generic ... [8 implementers]
pkg/generic/generic.go
WithDoFinish (Interface)
WithDoFinish should be implemented when: (1) you want to wrap a stream in client middleware, and (2) you want to manuall [11 …
pkg/streaming/streaming.go
Tracer (Interface)
Tracer is executed at the start and finish of an RPC. [9 implementers]
pkg/stats/tracer.go
Reusable (Interface)
Reusable means a object is reusable. [16 implementers]
internal/reusable.go

Core symbols most depended-on inside this repo

Assert
called by 6197
internal/test/assert.go
Run
called by 595
pkg/profiler/profiler.go
Helper
called by 554
internal/test/assert.go
Errorf
called by 403
pkg/klog/log.go
Call
called by 324
client/client.go
Assert
called by 303
pkg/protocol/bthrift/internal/test/assert.go
Error
called by 226
pkg/remote/trans/nphttp2/grpc/transport.go
Close
called by 181
pkg/remote/trans/nphttp2/grpc/transport.go

Shape

Method 4,363
Function 3,068
Struct 972
Interface 229
FuncType 73
TypeAlias 62

Languages

Go100%

Modules by API surface

internal/mocks/thrift/testservice.go114 symbols
internal/mocks/klog/log.go112 symbols
internal/mocks/thrift/k-testservice.go110 symbols
pkg/remote/trans/nphttp2/grpc/transport.go97 symbols
internal/mocks/proto/kitex_gen/pbapi/mock/mock.go96 symbols
internal/mocks/netpoll/nocopy.go88 symbols
internal/mocks/remote/trans_handler.go84 symbols
internal/mocks/net/net.go84 symbols
internal/mocks/netpoll/connection.go78 symbols
pkg/generic/generic.go76 symbols
pkg/remote/trans/nphttp2/grpc/controlbuf.go72 symbols
pkg/remote/trans/nphttp2/grpc/transport_test.go70 symbols

Dependencies from manifests, versioned

github.com/apache/thriftv0.13.0 · 1×
github.com/bytedance/gopkgv0.1.4 · 1×
github.com/bytedance/sonicv1.15.0 · 1×
github.com/bytedance/sonic/loaderv0.5.0 · 1×
github.com/cloudwego/base64xv0.1.6 · 1×
github.com/cloudwego/configmanagerv0.2.3 · 1×
github.com/cloudwego/dynamicgov0.8.0 · 1×
github.com/cloudwego/fastpbv0.0.6 · 1×
github.com/cloudwego/frugalv0.3.1 · 1×
github.com/cloudwego/gopkgv0.2.0 · 1×
github.com/cloudwego/localsessionv0.2.1 · 1×
github.com/cloudwego/netpollv0.7.2 · 1×

For agents

$ claude mcp add kitex \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact