ccgo

module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0

README

ccgo 国密改造fabric 使用go加密模块

================ 基于go1.17.5实现的国密算法库,包括:

  • sm2 : 基于emmansun/gmsm的sm2部分实现部分扩展。
  • sm2soft : 基于tjfoc/gmsm的sm2部分的纯软实现,仅作验证与参考用。
  • sm3 : 基于emmansun/gmsm的sm3部分实现部分扩展。
  • sm3soft : 基于tjfoc/gmsm的sm3部分的纯软实现,仅作验证与参考用。
  • sm4 : 基于emmansun/gmsm的sm4部分实现部分扩展。
  • sm4soft : 基于tjfoc/gmsm的sm4部分的纯软实现,仅作验证与参考用。
  • x509 : 基于go1.17.5的x509包与本项目的sm2/sm3/sm4包实现国密改造。
  • gmtls : 基于go1.17.5的tls包与本项目的sm2/sm3/sm4包实现国密改造。
  • gmhttp : 基于go1.17.5net/http包做了对应的国密改造。
  • grpc : 基于google.golang.org/grpcv1.44.0版本做了对应的国密改造。

在x509与gmtls的实现中,国密算法采用的是基于emmansun/gmsm的国密实现,该开源项目已实现利用amd64与arm64架构CPU实现对应国密算法的硬件加速。sm2soft/sm3soft/sm4soft是对应国密算法的纯软实现,仅用作验证与参考。

gmgo的包路径

go package: github.com/hxx258456/ccgo

国密标准参考

本项目涉及到的国密有SM2、SM3和SM4,相关国密标准如下:

  • GB/T 33560-2017 密码应用标识规范
  • GB/T 32918.1-2016 SM2椭圆曲线公钥密码算法 第1部分:总则
  • GB/T 32918.2-2016 SM2椭圆曲线公钥密码算法 第2部分:数字签名算法
  • GB/T 32918.3-2016 SM2椭圆曲线公钥密码算法 第3部分:密钥交换协议
  • GB/T 32918.4-2016 SM2椭圆曲线公钥密码算法 第4部分:公钥加密算法
  • GB/T 32918.5-2017 SM2椭圆曲线公钥密码算法 第5部分:参数定义
  • GB/T 35275-2017 SM2密码算法加密签名消息语法规范
  • GB/T 35276-2017 SM2密码算法使用规范
  • GB/T 32905-2016 SM3密码杂凑算法
  • GB/T 32907-2016 SM4分组密码算法

测试案例

从测试案例入手快速了解gmgo的使用。

sm2

测试案例代码: sm2test/sm2_test.go

cd sm2test
go test

sm3

测试案例代码: sm3/sm3_test.go

cd sm3
go test

sm4

测试案例代码: sm4/sm4_test.gosm4/sm4_gcm_test.go

cd sm4
go test

x509

测试案例代码: x509/x509_test.go

cd x509
go test -v -run "^(TestX509|TestX509WithFile|TestCreateCertFromCA)$"

注意,x509_testTestCreateCertFromCA测试函数生成的sm2系列密钥文件与证书将会用于gmtlsgmgrpc的测试案例。

gmtls

测试案例代码: gmtls/tls_test/tls_test.go

cd gmtls/tls_test
go test

执行之前请确认certs目录下的sm2系列文件是否最新。可以在该目录下执行copyCerts.sh直接从x509的对应目录下拷贝。

gmgrpc

测试案例代码: grpc/grpc_test/grpc_test.go

cd grpc/grpc_test
go test

执行之前请确认testdata目录下的文件是否最新。可以在该目录下执行copyCerts.sh直接从x509的对应目录下拷贝。

本项目参考了以下开源项目,基于其代码做了部分二次开发,向对应的开源作者表示感谢!

  • https://github.com/emmansun/gmsm
  • https://github.com/tjfoc/gmsm
  • https://github.com/golang/go
  • https://github.com/grpc/grpc-go
  • https://github.com/envoyproxy/go-control-plane
  • https://github.com/golang/net
  • https://github.com/gorilla/mux
  • https://github.com/gorilla/handlers
  • https://github.com/felixge/httpsnoop
  • https://github.com/grpc-ecosystem/go-grpc-middleware
  • https://github.com/prometheus/client_golang

对应的版权声明参见目录thrid_licenses

Directories

Path Synopsis
Package http provides HTTP client and server implementations.
Package http provides HTTP client and server implementations.
cgi
Package cgi implements CGI (Common Gateway Interface) as specified in RFC 3875.
Package cgi implements CGI (Common Gateway Interface) as specified in RFC 3875.
cookiejar
Package cookiejar implements an in-memory RFC 6265-compliant http.CookieJar.
Package cookiejar implements an in-memory RFC 6265-compliant http.CookieJar.
fcgi
Package fcgi implements the FastCGI protocol.
Package fcgi implements the FastCGI protocol.
httptest
Package httptest provides utilities for HTTP testing.
Package httptest provides utilities for HTTP testing.
httptrace
Package httptrace provides mechanisms to trace the events within HTTP client requests.
Package httptrace provides mechanisms to trace the events within HTTP client requests.
httputil
Package httputil provides HTTP utility functions, complementing the more common ones in the net/http package.
Package httputil provides HTTP utility functions, complementing the more common ones in the net/http package.
internal
Package internal contains HTTP internals shared by net/http and net/http/httputil.
Package internal contains HTTP internals shared by net/http and net/http/httputil.
internal/testcert
Package testcert contains a test-only localhost certificate.
Package testcert contains a test-only localhost certificate.
pprof
Package pprof serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool.
Package pprof serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool.
Package tls partially implements TLS 1.2, as specified in RFC 5246, and TLS 1.3, as specified in RFC 8446.
Package tls partially implements TLS 1.2, as specified in RFC 5246, and TLS 1.3, as specified in RFC 8446.
go-control-plane
pkg/cache/v3
Package cache defines a configuration cache for the server.
Package cache defines a configuration cache for the server.
pkg/conversion
Package conversion contains shared utility functions for converting xDS resources.
Package conversion contains shared utility functions for converting xDS resources.
pkg/log
Package log provides a logging interface for use in this library.
Package log provides a logging interface for use in this library.
pkg/server/rest/v3
Package rest provides an implementation of REST-JSON part of XDS server
Package rest provides an implementation of REST-JSON part of XDS server
pkg/server/sotw/v3
Package sotw provides an implementation of GRPC SoTW (State of The World) part of XDS server
Package sotw provides an implementation of GRPC SoTW (State of The World) part of XDS server
pkg/server/v3
Package server provides an implementation of a streaming xDS server.
Package server provides an implementation of a streaming xDS server.
pkg/test
Package test contains test utilities
Package test contains test utilities
pkg/test/main
Package main contains the test driver for testing xDS manually.
Package main contains the test driver for testing xDS manually.
pkg/test/resource/v3
Package resource creates test xDS resources
Package resource creates test xDS resources
pkg/test/v3
Package test contains test utilities
Package test contains test utilities
pkg/wellknown
Package wellknown contains common names for filters, listeners, etc.
Package wellknown contains common names for filters, listeners, etc.
`grpc_middleware` is a collection of gRPC middleware packages: interceptors, helpers and tools.
`grpc_middleware` is a collection of gRPC middleware packages: interceptors, helpers and tools.
auth
`grpc_auth` a generic server-side auth middleware for gRPC.
`grpc_auth` a generic server-side auth middleware for gRPC.
logging
grpc_logging is a "parent" package for gRPC logging middlewares.
grpc_logging is a "parent" package for gRPC logging middlewares.
logging/logrus
`grpc_logrus` is a gRPC logging middleware backed by Logrus loggers
`grpc_logrus` is a gRPC logging middleware backed by Logrus loggers
logging/logrus/ctxlogrus
`ctxlogrus` is a ctxlogger that is backed by logrus
`ctxlogrus` is a ctxlogger that is backed by logrus
logging/zap
`grpc_zap` is a gRPC logging middleware backed by ZAP loggers
`grpc_zap` is a gRPC logging middleware backed by ZAP loggers
logging/zap/ctxzap
`ctxzap` is a ctxlogger that is backed by Zap
`ctxzap` is a ctxlogger that is backed by Zap
recovery
`grpc_recovery` are intereceptors that recover from gRPC handler panics.
`grpc_recovery` are intereceptors that recover from gRPC handler panics.
retry
`grpc_retry` provides client-side request retry logic for gRPC.
`grpc_retry` provides client-side request retry logic for gRPC.
tags
`grpc_ctxtags` adds a Tag object to the context that can be used by other middleware to add context about a request.
`grpc_ctxtags` adds a Tag object to the context that can be used by other middleware to add context about a request.
testing/gogotestproto
Package mwitkow_testproto is a generated protocol buffer package.
Package mwitkow_testproto is a generated protocol buffer package.
testing/testproto
Package mwitkow_testproto is a generated protocol buffer package.
Package mwitkow_testproto is a generated protocol buffer package.
tracing/opentracing
`grpc_opentracing` adds OpenTracing
`grpc_opentracing` adds OpenTracing
util/backoffutils
Backoff Helper Utilities
Backoff Helper Utilities
validator
`grpc_validator` is a generic request contents validator server-side middleware for gRPC.
`grpc_validator` is a generic request contents validator server-side middleware for gRPC.
package grpc implements an RPC system called gRPC.
package grpc implements an RPC system called gRPC.
admin
Package admin provides a convenient method for registering a collection of administration services to a gRPC server.
Package admin provides a convenient method for registering a collection of administration services to a gRPC server.
admin/test
Package test contains test only functions for package admin.
Package test contains test only functions for package admin.
attributes
Package attributes defines a generic key/value store used in various gRPC components.
Package attributes defines a generic key/value store used in various gRPC components.
authz
Package authz exposes methods to manage authorization within gRPC.
Package authz exposes methods to manage authorization within gRPC.
backoff
Package backoff provides configuration options for backoff.
Package backoff provides configuration options for backoff.
balancer
Package balancer defines APIs for load balancing in gRPC.
Package balancer defines APIs for load balancing in gRPC.
balancer/base
Package base defines a balancer base that can be used to build balancers with different picking algorithms.
Package base defines a balancer base that can be used to build balancers with different picking algorithms.
balancer/grpclb
package grpclb defines a grpclb balancer.
package grpclb defines a grpclb balancer.
balancer/grpclb/state
Package state declares grpclb types to be set by resolvers wishing to pass information to grpclb via resolver.State Attributes.
Package state declares grpclb types to be set by resolvers wishing to pass information to grpclb via resolver.State Attributes.
balancer/rls
Package rls imports to init the rls lb policy for testing purposes.
Package rls imports to init the rls lb policy for testing purposes.
balancer/rls/internal
Package rls implements the RLS LB policy.
Package rls implements the RLS LB policy.
balancer/rls/internal/adaptive
Package adaptive provides functionality for adaptive client-side throttling.
Package adaptive provides functionality for adaptive client-side throttling.
balancer/rls/internal/keys
Package keys provides functionality required to build RLS request keys.
Package keys provides functionality required to build RLS request keys.
balancer/rls/internal/test/e2e
Package e2e contains utilities for end-to-end RouteLookupService tests.
Package e2e contains utilities for end-to-end RouteLookupService tests.
balancer/rls/internal/testutils/fakeserver
Package fakeserver provides a fake implementation of the RouteLookupService, to be used in unit tests.
Package fakeserver provides a fake implementation of the RouteLookupService, to be used in unit tests.
balancer/roundrobin
Package roundrobin defines a roundrobin balancer.
Package roundrobin defines a roundrobin balancer.
balancer/weightedroundrobin
Package weightedroundrobin defines a weighted roundrobin balancer.
Package weightedroundrobin defines a weighted roundrobin balancer.
balancer/weightedtarget
Package weightedtarget implements the weighted_target balancer.
Package weightedtarget implements the weighted_target balancer.
balancer/weightedtarget/weightedaggregator
Package weightedaggregator implements state aggregator for weighted_target balancer.
Package weightedaggregator implements state aggregator for weighted_target balancer.
benchmark
Package benchmark implements the building blocks to setup end-to-end gRPC benchmarks.
Package benchmark implements the building blocks to setup end-to-end gRPC benchmarks.
benchmark/benchmain
Package main provides benchmark with setting flags.
Package main provides benchmark with setting flags.
benchmark/benchresult
To format the benchmark result:
To format the benchmark result:
benchmark/client
Package main provides a client used for benchmarking.
Package main provides a client used for benchmarking.
benchmark/flags
Package flags provide convenience types and routines to accept specific types of flag values on the command line.
Package flags provide convenience types and routines to accept specific types of flag values on the command line.
benchmark/latency
Package latency provides wrappers for net.Conn, net.Listener, and net.Dialers, designed to interoperate to inject real-world latency into network connections.
Package latency provides wrappers for net.Conn, net.Listener, and net.Dialers, designed to interoperate to inject real-world latency into network connections.
benchmark/server
Package main provides a server used for benchmarking.
Package main provides a server used for benchmarking.
benchmark/stats
Package stats tracks the statistics associated with benchmark runs.
Package stats tracks the statistics associated with benchmark runs.
benchmark/worker
Binary worker implements the benchmark worker that can turn into a benchmark client or server.
Binary worker implements the benchmark worker that can turn into a benchmark client or server.
binarylog
Package binarylog implementation binary logging as defined in https://github.com/grpc/proposal/blob/master/A16-binary-logging.md.
Package binarylog implementation binary logging as defined in https://github.com/grpc/proposal/blob/master/A16-binary-logging.md.
channelz/service
Package service provides an implementation for channelz service server.
Package service provides an implementation for channelz service server.
codes
Package codes defines the canonical error codes used by gRPC.
Package codes defines the canonical error codes used by gRPC.
connectivity
Package connectivity defines connectivity semantics.
Package connectivity defines connectivity semantics.
credentials
Package credentials implements various credentials supported by gRPC library, which encapsulate all the state needed by a client to authenticate with a server and make various assertions, e.g., about the client's identity, role, or whether it is authorized to make a particular call.
Package credentials implements various credentials supported by gRPC library, which encapsulate all the state needed by a client to authenticate with a server and make various assertions, e.g., about the client's identity, role, or whether it is authorized to make a particular call.
credentials/alts
Package alts implements the ALTS credential support by gRPC library, which encapsulates all the state needed by a client to authenticate with a server using ALTS and make various assertions, e.g., about the client's identity, role, or whether it is authorized to make a particular call.
Package alts implements the ALTS credential support by gRPC library, which encapsulates all the state needed by a client to authenticate with a server using ALTS and make various assertions, e.g., about the client's identity, role, or whether it is authorized to make a particular call.
credentials/alts/internal
Package internal contains common core functionality for ALTS.
Package internal contains common core functionality for ALTS.
credentials/alts/internal/authinfo
Package authinfo provide authentication information returned by handshakers.
Package authinfo provide authentication information returned by handshakers.
credentials/alts/internal/conn
Package conn contains an implementation of a secure channel created by gRPC handshakers.
Package conn contains an implementation of a secure channel created by gRPC handshakers.
credentials/alts/internal/handshaker
Package handshaker provides ALTS handshaking functionality for GCP.
Package handshaker provides ALTS handshaking functionality for GCP.
credentials/alts/internal/handshaker/service
Package service manages connections between the VM application and the ALTS handshaker service.
Package service manages connections between the VM application and the ALTS handshaker service.
credentials/alts/internal/testutil
Package testutil include useful test utilities for the handshaker.
Package testutil include useful test utilities for the handshaker.
credentials/google
Package google defines credentials for google cloud services.
Package google defines credentials for google cloud services.
credentials/insecure
Package insecure provides an implementation of the credentials.TransportCredentials interface which disables transport security.
Package insecure provides an implementation of the credentials.TransportCredentials interface which disables transport security.
credentials/local
Package local implements local transport credentials.
Package local implements local transport credentials.
credentials/oauth
Package oauth implements gRPC credentials using OAuth.
Package oauth implements gRPC credentials using OAuth.
credentials/sts
Package sts implements call credentials using STS (Security Token Service) as defined in https://tools.ietf.org/html/rfc8693.
Package sts implements call credentials using STS (Security Token Service) as defined in https://tools.ietf.org/html/rfc8693.
credentials/tls/certprovider
Package certprovider defines APIs for Certificate Providers in gRPC.
Package certprovider defines APIs for Certificate Providers in gRPC.
credentials/tls/certprovider/pemfile
Package pemfile provides a file watching certificate provider plugin implementation which works for files with PEM contents.
Package pemfile provides a file watching certificate provider plugin implementation which works for files with PEM contents.
credentials/xds
Package xds provides a transport credentials implementation where the security configuration is pushed by a management server using xDS APIs.
Package xds provides a transport credentials implementation where the security configuration is pushed by a management server using xDS APIs.
encoding
Package encoding defines the interface for the compressor and codec, and functions to register and retrieve compressors and codecs.
Package encoding defines the interface for the compressor and codec, and functions to register and retrieve compressors and codecs.
encoding/gzip
Package gzip implements and registers the gzip compressor during the initialization.
Package gzip implements and registers the gzip compressor during the initialization.
encoding/proto
Package proto defines the protobuf codec.
Package proto defines the protobuf codec.
grpc_test/echo
Package echo is a generated protocol buffer package.
Package echo is a generated protocol buffer package.
grpclog
package grpclog defines logging for grpc.
package grpclog defines logging for grpc.
grpclog/glogger
Package glogger defines glog-based logging for grpc.
Package glogger defines glog-based logging for grpc.
health
Package health provides a service that exposes server's health and it must be imported to enable support for client-side health checks.
Package health provides a service that exposes server's health and it must be imported to enable support for client-side health checks.
internal
Package internal contains gRPC-internal code, to avoid polluting the godoc of the top-level grpc package.
Package internal contains gRPC-internal code, to avoid polluting the godoc of the top-level grpc package.
internal/admin
Package admin contains internal implementation for admin service.
Package admin contains internal implementation for admin service.
internal/backoff
Package backoff implement the backoff strategy for gRPC.
Package backoff implement the backoff strategy for gRPC.
internal/balancer/stub
Package stub implements a balancer for testing purposes.
Package stub implements a balancer for testing purposes.
internal/balancergroup
Package balancergroup implements a utility struct to bind multiple balancers into one balancer.
Package balancergroup implements a utility struct to bind multiple balancers into one balancer.
internal/balancerload
Package balancerload defines APIs to parse server loads in trailers.
Package balancerload defines APIs to parse server loads in trailers.
internal/binarylog
Package binarylog implementation binary logging as defined in https://github.com/grpc/proposal/blob/master/A16-binary-logging.md.
Package binarylog implementation binary logging as defined in https://github.com/grpc/proposal/blob/master/A16-binary-logging.md.
internal/buffer
Package buffer provides an implementation of an unbounded buffer.
Package buffer provides an implementation of an unbounded buffer.
internal/cache
Package cache implements caches to be used in gRPC.
Package cache implements caches to be used in gRPC.
internal/channelz
Package channelz defines APIs for enabling channelz service, entry registration/deletion, and accessing channelz data.
Package channelz defines APIs for enabling channelz service, entry registration/deletion, and accessing channelz data.
internal/credentials
Package credentials defines APIs for parsing SPIFFE ID.
Package credentials defines APIs for parsing SPIFFE ID.
internal/credentials/xds
Package xds contains non-user facing functionality of the xds credentials.
Package xds contains non-user facing functionality of the xds credentials.
internal/envconfig
Package envconfig contains grpc settings configured by environment variables.
Package envconfig contains grpc settings configured by environment variables.
internal/googlecloud
Package googlecloud contains internal helpful functions for google cloud.
Package googlecloud contains internal helpful functions for google cloud.
internal/grpclog
package grpclog (internal) defines depth logging for grpc.
package grpclog (internal) defines depth logging for grpc.
internal/grpcrand
package grpcrand implements math/rand functions in a concurrent-safe way with a global random source, independent of math/rand's global source.
package grpcrand implements math/rand functions in a concurrent-safe way with a global random source, independent of math/rand's global source.
internal/grpcsync
package grpcsync implements additional synchronization primitives built upon the sync package.
package grpcsync implements additional synchronization primitives built upon the sync package.
internal/grpctest
package grpctest implements testing helpers.
package grpctest implements testing helpers.
internal/grpcutil
package grpcutil provides utility functions used across the gRPC codebase.
package grpcutil provides utility functions used across the gRPC codebase.
internal/hierarchy
Package hierarchy contains functions to set and get hierarchy string from addresses.
Package hierarchy contains functions to set and get hierarchy string from addresses.
internal/leakcheck
Package leakcheck contains functions to check leaked goroutines.
Package leakcheck contains functions to check leaked goroutines.
internal/metadata
Package metadata contains functions to set and get metadata from addresses.
Package metadata contains functions to set and get metadata from addresses.
internal/pretty
Package pretty defines helper functions to pretty-print structs for logging.
Package pretty defines helper functions to pretty-print structs for logging.
internal/profiling
Package profiling contains two logical components: buffer.go and profiling.go.
Package profiling contains two logical components: buffer.go and profiling.go.
internal/profiling/buffer
Package buffer provides a high-performant lock free implementation of a circular buffer used by the profiling code.
Package buffer provides a high-performant lock free implementation of a circular buffer used by the profiling code.
internal/resolver
Package resolver provides internal resolver-related functionality.
Package resolver provides internal resolver-related functionality.
internal/resolver/dns
Package dns implements a dns resolver to be installed as the default resolver in grpc.
Package dns implements a dns resolver to be installed as the default resolver in grpc.
internal/resolver/passthrough
Package passthrough implements a pass-through resolver.
Package passthrough implements a pass-through resolver.
internal/resolver/unix
Package unix implements a resolver for unix targets.
Package unix implements a resolver for unix targets.
internal/serviceconfig
Package serviceconfig contains utility functions to parse service config.
Package serviceconfig contains utility functions to parse service config.
internal/status
Package status implements errors returned by gRPC.
Package status implements errors returned by gRPC.
internal/stubserver
Package stubserver is a stubbable implementation of google.golang.org/grpc/test/grpc_testing for testing purposes.
Package stubserver is a stubbable implementation of google.golang.org/grpc/test/grpc_testing for testing purposes.
internal/syscall
Package syscall provides functionalities that grpc uses to get low-level operating system stats/info.
Package syscall provides functionalities that grpc uses to get low-level operating system stats/info.
internal/testutils
Package testutils contains testing helpers.
Package testutils contains testing helpers.
internal/transport
Package transport defines and implements message oriented communication channel to complete various transactions (e.g., an RPC).
Package transport defines and implements message oriented communication channel to complete various transactions (e.g., an RPC).
internal/transport/networktype
Package networktype declares the network type to be used in the default dialer.
Package networktype declares the network type to be used in the default dialer.
internal/wrr
Package wrr contains the interface and common implementations of wrr algorithms.
Package wrr contains the interface and common implementations of wrr algorithms.
internal/xds
Package xds contains types that need to be shared between code under google.golang.org/grpc/xds/...
Package xds contains types that need to be shared between code under google.golang.org/grpc/xds/...
internal/xds/matcher
Package matcher contains types that need to be shared between code under google.golang.org/grpc/xds/...
Package matcher contains types that need to be shared between code under google.golang.org/grpc/xds/...
internal/xds/rbac
Package rbac provides service-level and method-level access control for a service.
Package rbac provides service-level and method-level access control for a service.
interop
Package interop contains functions used by interop client/server.
Package interop contains functions used by interop client/server.
interop/alts/client
This binary can only run on Google Cloud Platform (GCP).
This binary can only run on Google Cloud Platform (GCP).
interop/alts/server
This binary can only run on Google Cloud Platform (GCP).
This binary can only run on Google Cloud Platform (GCP).
interop/client
Binary client is an interop client.
Binary client is an interop client.
interop/fake_grpclb
This file is for testing only.
This file is for testing only.
interop/grpclb_fallback
Binary grpclb_fallback is an interop test client for grpclb fallback.
Binary grpclb_fallback is an interop test client for grpclb fallback.
interop/http2
Binary http2 is used to test http2 error edge cases like GOAWAYs and RST_STREAMs
Binary http2 is used to test http2 error edge cases like GOAWAYs and RST_STREAMs
interop/server
Binary server is an interop server.
Binary server is an interop server.
interop/xds/client
Binary client for xDS interop tests.
Binary client for xDS interop tests.
interop/xds/server
Binary server is the server used for xDS interop tests.
Binary server is the server used for xDS interop tests.
keepalive
Package keepalive defines configurable parameters for point-to-point healthcheck.
Package keepalive defines configurable parameters for point-to-point healthcheck.
metadata
Package metadata define the structure of the metadata supported by gRPC library.
Package metadata define the structure of the metadata supported by gRPC library.
peer
Package peer defines various peer information associated with RPCs and corresponding utils.
Package peer defines various peer information associated with RPCs and corresponding utils.
profiling
Package profiling exposes methods to manage profiling within gRPC.
Package profiling exposes methods to manage profiling within gRPC.
profiling/cmd
Binary cmd is a command-line tool for profiling management.
Binary cmd is a command-line tool for profiling management.
profiling/service
Package service defines methods to register a gRPC client/service for a profiling service that is exposed in the same server.
Package service defines methods to register a gRPC client/service for a profiling service that is exposed in the same server.
reflection
Package reflection implements server reflection service.
Package reflection implements server reflection service.
reflection/grpc_testingv3
package grpc_testingv3 is a generated protocol buffer package.
package grpc_testingv3 is a generated protocol buffer package.
resolver
Package resolver defines APIs for name resolution in gRPC.
Package resolver defines APIs for name resolution in gRPC.
resolver/dns
Package dns implements a dns resolver to be installed as the default resolver in grpc.
Package dns implements a dns resolver to be installed as the default resolver in grpc.
resolver/manual
Package manual defines a resolver that can be used to manually send resolved addresses to ClientConn.
Package manual defines a resolver that can be used to manually send resolved addresses to ClientConn.
resolver/passthrough
Package passthrough implements a pass-through resolver.
Package passthrough implements a pass-through resolver.
serviceconfig
Package serviceconfig defines types and methods for operating on gRPC service configs.
Package serviceconfig defines types and methods for operating on gRPC service configs.
stats
Package stats is for collecting and reporting various network and RPC stats.
Package stats is for collecting and reporting various network and RPC stats.
status
Package status implements errors returned by gRPC.
Package status implements errors returned by gRPC.
stress/client
client starts an interop client to do stress test and a metrics server to report qps.
client starts an interop client to do stress test and a metrics server to report qps.
stress/metrics_client
Binary metrics_client is a client to retrieve metrics from the server.
Binary metrics_client is a client to retrieve metrics from the server.
tap
Package tap defines the function handles which are executed on the transport layer of gRPC-Go and related information.
Package tap defines the function handles which are executed on the transport layer of gRPC-Go and related information.
test
Package test contains tests.
Package test contains tests.
test/bufconn
Package bufconn provides a net.Conn implemented by a buffer and related dialing and listening functionality.
Package bufconn provides a net.Conn implemented by a buffer and related dialing and listening functionality.
xds
Package xds contains an implementation of the xDS suite of protocols, to be used by gRPC client and server applications.
Package xds contains an implementation of the xDS suite of protocols, to be used by gRPC client and server applications.
xds/csds
Package csds implements features to dump the status (xDS responses) the xds_client is using.
Package csds implements features to dump the status (xDS responses) the xds_client is using.
xds/googledirectpath
Package googledirectpath implements a resolver that configures xds to make cloud to prod directpath connection.
Package googledirectpath implements a resolver that configures xds to make cloud to prod directpath connection.
xds/internal
Package internal contains functions/structs shared by xds balancers/resolvers.
Package internal contains functions/structs shared by xds balancers/resolvers.
xds/internal/balancer
Package balancer installs all the xds balancers.
Package balancer installs all the xds balancers.
xds/internal/balancer/cdsbalancer
Package cdsbalancer implements a balancer to handle CDS responses.
Package cdsbalancer implements a balancer to handle CDS responses.
xds/internal/balancer/clusterimpl
Package clusterimpl implements the xds_cluster_impl balancing policy.
Package clusterimpl implements the xds_cluster_impl balancing policy.
xds/internal/balancer/clustermanager
Package clustermanager implements the cluster manager LB policy for xds.
Package clustermanager implements the cluster manager LB policy for xds.
xds/internal/balancer/clusterresolver
Package clusterresolver contains EDS balancer implementation.
Package clusterresolver contains EDS balancer implementation.
xds/internal/balancer/loadstore
Package loadstore contains the loadStoreWrapper shared by the balancers.
Package loadstore contains the loadStoreWrapper shared by the balancers.
xds/internal/balancer/orca
Package orca implements Open Request Cost Aggregation.
Package orca implements Open Request Cost Aggregation.
xds/internal/balancer/priority
Package priority implements the priority balancer.
Package priority implements the priority balancer.
xds/internal/balancer/ringhash
Package ringhash implements the ringhash balancer.
Package ringhash implements the ringhash balancer.
xds/internal/clusterspecifier
Package clusterspecifier contains the ClusterSpecifier interface and a registry for storing and retrieving their implementations.
Package clusterspecifier contains the ClusterSpecifier interface and a registry for storing and retrieving their implementations.
xds/internal/clusterspecifier/rls
Package rls implements the RLS cluster specifier plugin.
Package rls implements the RLS cluster specifier plugin.
xds/internal/httpfilter
Package httpfilter contains the HTTPFilter interface and a registry for storing and retrieving their implementations.
Package httpfilter contains the HTTPFilter interface and a registry for storing and retrieving their implementations.
xds/internal/httpfilter/fault
Package fault implements the Envoy Fault Injection HTTP filter.
Package fault implements the Envoy Fault Injection HTTP filter.
xds/internal/httpfilter/rbac
Package rbac implements the Envoy RBAC HTTP filter.
Package rbac implements the Envoy RBAC HTTP filter.
xds/internal/httpfilter/router
Package router implements the Envoy Router HTTP filter.
Package router implements the Envoy Router HTTP filter.
xds/internal/resolver
Package resolver implements the xds resolver, that does LDS and RDS to find the cluster to use.
Package resolver implements the xds resolver, that does LDS and RDS to find the cluster to use.
xds/internal/server
Package server contains internal server-side functionality used by the public facing xds package.
Package server contains internal server-side functionality used by the public facing xds package.
xds/internal/test/e2e
Package e2e implements xds e2e tests using go-control-plane.
Package e2e implements xds e2e tests using go-control-plane.
xds/internal/testutils
Package testutils provides utility types, for use in xds tests.
Package testutils provides utility types, for use in xds tests.
xds/internal/testutils/e2e
Package e2e provides utilities for end2end testing of xDS functionality.
Package e2e provides utilities for end2end testing of xDS functionality.
xds/internal/testutils/fakeclient
Package fakeclient provides a fake implementation of an xDS client.
Package fakeclient provides a fake implementation of an xDS client.
xds/internal/testutils/fakeserver
Package fakeserver provides a fake implementation of the management server.
Package fakeserver provides a fake implementation of the management server.
xds/internal/xdsclient
Package xdsclient implements a full fledged gRPC client for the xDS API used by the xds resolver and balancer implementations.
Package xdsclient implements a full fledged gRPC client for the xDS API used by the xds resolver and balancer implementations.
xds/internal/xdsclient/bootstrap
Package bootstrap provides the functionality to initialize certain aspects of an xDS client by reading a bootstrap file.
Package bootstrap provides the functionality to initialize certain aspects of an xDS client by reading a bootstrap file.
xds/internal/xdsclient/controller
Package controller contains implementation to connect to the control plane.
Package controller contains implementation to connect to the control plane.
xds/internal/xdsclient/controller/version
Package version defines APIs to deal with different versions of xDS.
Package version defines APIs to deal with different versions of xDS.
xds/internal/xdsclient/controller/version/v2
Package v2 provides xDS v2 transport protocol specific functionality.
Package v2 provides xDS v2 transport protocol specific functionality.
xds/internal/xdsclient/controller/version/v3
Package v3 provides xDS v3 transport protocol specific functionality.
Package v3 provides xDS v3 transport protocol specific functionality.
xds/internal/xdsclient/load
Package load provides functionality to record and maintain load data.
Package load provides functionality to record and maintain load data.
xds/internal/xdsclient/pubsub
Package pubsub implements a utility type to maintain resource watchers and the updates.
Package pubsub implements a utility type to maintain resource watchers and the updates.
xds/internal/xdsclient/xdsresource
Package xdsresource contains functions to proto xds updates (unmarshal from proto), and types for the resource updates.
Package xdsresource contains functions to proto xds updates (unmarshal from proto), and types for the resource updates.
xds/internal/xdsclient/xdsresource/version
Package version defines constants to distinguish between supported xDS API versions.
Package version defines constants to distinguish between supported xDS API versions.
Package handlers is a collection of handlers (aka "HTTP middleware") for use with Go's net/http package (or any framework supporting http.Handler).
Package handlers is a collection of handlers (aka "HTTP middleware") for use with Go's net/http package (or any framework supporting http.Handler).
Package httpsnoop provides an easy way to capture http related metrics (i.e.
Package httpsnoop provides an easy way to capture http related metrics (i.e.
internal
abi
buildcfg
Package buildcfg provides access to the build configuration described by the current environment.
Package buildcfg provides access to the build configuration described by the current environment.
cfg
Package cfg holds configuration shared by the Go command and internal/testenv.
Package cfg holds configuration shared by the Go command and internal/testenv.
cpu
Package cpu implements processor feature detection used by the Go standard library.
Package cpu implements processor feature detection used by the Go standard library.
execabs
Package execabs is a drop-in replacement for os/exec that requires PATH lookups to find absolute paths.
Package execabs is a drop-in replacement for os/exec that requires PATH lookups to find absolute paths.
fmtsort
Package fmtsort provides a general stable ordering mechanism for maps, on behalf of the fmt and text/template packages.
Package fmtsort provides a general stable ordering mechanism for maps, on behalf of the fmt and text/template packages.
goexperiment
Package goexperiment implements support for toolchain experiments.
Package goexperiment implements support for toolchain experiments.
lazyregexp
Package lazyregexp is a thin wrapper over regexp, allowing the use of global regexp variables without forcing them to be compiled at init.
Package lazyregexp is a thin wrapper over regexp, allowing the use of global regexp variables without forcing them to be compiled at init.
lazytemplate
Package lazytemplate is a thin wrapper over text/template, allowing the use of global template variables without forcing them to be parsed at init.
Package lazytemplate is a thin wrapper over text/template, allowing the use of global template variables without forcing them to be parsed at init.
nettrace
Package nettrace contains internal hooks for tracing activity in the net package.
Package nettrace contains internal hooks for tracing activity in the net package.
obscuretestdata
Package obscuretestdata contains functionality used by tests to more easily work with testdata that must be obscured primarily due to golang.org/issue/34986.
Package obscuretestdata contains functionality used by tests to more easily work with testdata that must be obscured primarily due to golang.org/issue/34986.
oserror
Package oserror defines errors values used in the os package.
Package oserror defines errors values used in the os package.
poll
Package poll supports non-blocking I/O on file descriptors with polling.
Package poll supports non-blocking I/O on file descriptors with polling.
profile
Package profile provides a representation of github.com/google/pprof/proto/profile.proto and methods to encode/decode/merge profiles in this format.
Package profile provides a representation of github.com/google/pprof/proto/profile.proto and methods to encode/decode/merge profiles in this format.
race
Package race contains helper functions for manually instrumenting code for the race detector.
Package race contains helper functions for manually instrumenting code for the race detector.
reflectlite
Package reflectlite implements lightweight version of reflect, not using any package except for "runtime" and "unsafe".
Package reflectlite implements lightweight version of reflect, not using any package except for "runtime" and "unsafe".
singleflight
Package singleflight provides a duplicate function call suppression mechanism.
Package singleflight provides a duplicate function call suppression mechanism.
syscall/windows/registry
Package registry provides access to the Windows registry.
Package registry provides access to the Windows registry.
syscall/windows/sysdll
Package sysdll is an internal leaf package that records and reports which Windows DLL names are used by Go itself.
Package sysdll is an internal leaf package that records and reports which Windows DLL names are used by Go itself.
sysinfo
Package sysinfo implements high level hardware information gathering that can be used for debugging or information purposes.
Package sysinfo implements high level hardware information gathering that can be used for debugging or information purposes.
testenv
Package testenv provides information about what functionality is available in different testing environments run by the Go team.
Package testenv provides information about what functionality is available in different testing environments run by the Go team.
testlog
Package testlog provides a back-channel communication path between tests and package os, so that cmd/go can see which environment variables and files a test consults.
Package testlog provides a back-channel communication path between tests and package os, so that cmd/go can see which environment variables and files a test consults.
unsafeheader
Package unsafeheader contains header declarations for the Go runtime's slice and string implementations.
Package unsafeheader contains header declarations for the Go runtime's slice and string implementations.
xcoff
Package xcoff implements access to XCOFF (Extended Common Object File Format) files.
Package xcoff implements access to XCOFF (Extended Common Object File Format) files.
xor
Package mux implements a request router and dispatcher.
Package mux implements a request router and dispatcher.
net
bpf
Package bpf implements marshaling and unmarshaling of programs for the Berkeley Packet Filter virtual machine, and provides a Go implementation of the virtual machine.
Package bpf implements marshaling and unmarshaling of programs for the Berkeley Packet Filter virtual machine, and provides a Go implementation of the virtual machine.
context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
context/ctxhttp
Package ctxhttp provides helper functions for performing context-aware HTTP requests.
Package ctxhttp provides helper functions for performing context-aware HTTP requests.
dict
Package dict implements the Dictionary Server Protocol as defined in RFC 2229.
Package dict implements the Dictionary Server Protocol as defined in RFC 2229.
dns/dnsmessage
Package dnsmessage provides a mostly RFC 1035 compliant implementation of DNS message packing and unpacking.
Package dnsmessage provides a mostly RFC 1035 compliant implementation of DNS message packing and unpacking.
html
Package html implements an HTML5-compliant tokenizer and parser.
Package html implements an HTML5-compliant tokenizer and parser.
html/atom
Package atom provides integer codes (also known as atoms) for a fixed set of frequently occurring HTML strings: tag names and attribute keys such as "p" and "id".
Package atom provides integer codes (also known as atoms) for a fixed set of frequently occurring HTML strings: tag names and attribute keys such as "p" and "id".
html/charset
Package charset provides common text encodings for HTML documents.
Package charset provides common text encodings for HTML documents.
http/httpguts
Package httpguts provides functions implementing various details of the HTTP specification.
Package httpguts provides functions implementing various details of the HTTP specification.
http/httpproxy
Package httpproxy provides support for HTTP proxy determination based on environment variables, as provided by net/http's ProxyFromEnvironment function.
Package httpproxy provides support for HTTP proxy determination based on environment variables, as provided by net/http's ProxyFromEnvironment function.
http2
Package http2 implements the HTTP/2 protocol.
Package http2 implements the HTTP/2 protocol.
http2/h2c
Package h2c implements the unencrypted "h2c" form of HTTP/2.
Package h2c implements the unencrypted "h2c" form of HTTP/2.
http2/h2i
The h2i command is an interactive HTTP/2 console.
The h2i command is an interactive HTTP/2 console.
http2/hpack
Package hpack implements HPACK, a compression format for efficiently representing HTTP header fields in the context of HTTP/2.
Package hpack implements HPACK, a compression format for efficiently representing HTTP header fields in the context of HTTP/2.
icmp
Package icmp provides basic functions for the manipulation of messages used in the Internet Control Message Protocols, ICMPv4 and ICMPv6.
Package icmp provides basic functions for the manipulation of messages used in the Internet Control Message Protocols, ICMPv4 and ICMPv6.
idna
Package idna implements IDNA2008 using the compatibility processing defined by UTS (Unicode Technical Standard) #46, which defines a standard to deal with the transition from IDNA2003.
Package idna implements IDNA2008 using the compatibility processing defined by UTS (Unicode Technical Standard) #46, which defines a standard to deal with the transition from IDNA2003.
internal/iana
Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
internal/socket
Package socket provides a portable interface for socket system calls.
Package socket provides a portable interface for socket system calls.
internal/socks
Package socks provides a SOCKS version 5 client implementation.
Package socks provides a SOCKS version 5 client implementation.
internal/sockstest
Package sockstest provides utilities for SOCKS testing.
Package sockstest provides utilities for SOCKS testing.
internal/timeseries
Package timeseries implements a time series structure for stats collection.
Package timeseries implements a time series structure for stats collection.
ipv4
Package ipv4 implements IP-level socket options for the Internet Protocol version 4.
Package ipv4 implements IP-level socket options for the Internet Protocol version 4.
ipv6
Package ipv6 implements IP-level socket options for the Internet Protocol version 6.
Package ipv6 implements IP-level socket options for the Internet Protocol version 6.
nettest
Package nettest provides utilities for network testing.
Package nettest provides utilities for network testing.
netutil
Package netutil provides network utility functions, complementing the more common ones in the net package.
Package netutil provides network utility functions, complementing the more common ones in the net package.
proxy
Package proxy provides support for a variety of protocols to proxy network data.
Package proxy provides support for a variety of protocols to proxy network data.
publicsuffix
Package publicsuffix provides a public suffix list based on data from https://publicsuffix.org/
Package publicsuffix provides a public suffix list based on data from https://publicsuffix.org/
route
Package route provides basic functions for the manipulation of packet routing facilities on BSD variants.
Package route provides basic functions for the manipulation of packet routing facilities on BSD variants.
trace
Package trace implements tracing of requests and long-lived objects.
Package trace implements tracing of requests and long-lived objects.
webdav
Package webdav provides a WebDAV server implementation.
Package webdav provides a WebDAV server implementation.
webdav/internal/xml
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
Package xml implements a simple XML 1.0 parser that understands XML name spaces.
websocket
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
Package websocket implements a client and server for the WebSocket protocol as specified in RFC 6455.
xsrftoken
Package xsrftoken provides methods for generating and validating secure XSRF tokens.
Package xsrftoken provides methods for generating and validating secure XSRF tokens.
prometheus
common/expfmt
Package expfmt contains tools for reading and writing Prometheus metrics.
Package expfmt contains tools for reading and writing Prometheus metrics.
promhttp
Package promhttp provides tooling around HTTP servers and clients.
Package promhttp provides tooling around HTTP servers and clients.
Package sm3 handle shangmi sm3 hash algorithm
Package sm3 handle shangmi sm3 hash algorithm
Package sm4 handle shangmi sm4 symmetric encryption algorithm
Package sm4 handle shangmi sm4 symmetric encryption algorithm
xcrypto
ocsp
Package ocsp parses OCSP responses as specified in RFC 2560.
Package ocsp parses OCSP responses as specified in RFC 2560.
pkcs12
Package pkcs12 implements some of PKCS#12.
Package pkcs12 implements some of PKCS#12.
pkcs12/internal/rc2
Package rc2 implements the RC2 cipher
Package rc2 implements the RC2 cipher

Jump to

Keyboard shortcuts

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