Documentation
¶
Index ¶
- Constants
- func NewContext(ctx context.Context, s AppInfo) context.Context
- type App
- type AppInfo
- type Option
- func WithEndpoints(endpoints []*url.URL) Option
- func WithId(id string) Option
- func WithLogger(logger log.Logger) Option
- func WithMetadata(metadata map[string]string) Option
- func WithName(Name string) Option
- func WithRESTServer(restserver ...restserver.Server) Option
- func WithRPCServer(rpcserver ...rpcserver.Server) Option
- func WithRegistrar(registrar registry.Registrar) Option
- func WithRegistrarTimeout(timeout time.Duration) Option
- func WithServer(server ...malitServer.Server) Option
- func WithSignal(signal []os.Signal) Option
- func WithStopTimeout(timeout time.Duration) Option
- func WithTags(tags []string) Option
- func WithVersion(version string) Option
- type Server
Constants ¶
View Source
const (
Release = "v 0.2.0"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppInfo ¶ added in v0.2.1
type AppInfo interface {
ID() string
Name() string
Version() string
Metadata() map[string]string
Endpoint() []string
}
AppInfo is application context value.
type Option ¶ added in v0.2.1
type Option func(*options)
func WithEndpoints ¶ added in v0.2.1
func WithLogger ¶ added in v0.2.1
func WithMetadata ¶ added in v0.2.1
func WithRESTServer ¶ added in v0.2.1
func WithRESTServer(restserver ...restserver.Server) Option
func WithRPCServer ¶ added in v0.2.1
func WithRegistrar ¶ added in v0.2.1
func WithRegistrarTimeout ¶ added in v0.2.1
func WithServer ¶ added in v0.2.1
func WithServer(server ...malitServer.Server) Option
func WithSignal ¶ added in v0.2.1
func WithStopTimeout ¶ added in v0.2.1
func WithVersion ¶ added in v0.2.1
Directories
¶
| Path | Synopsis |
|---|---|
|
api
|
|
|
metadata
this file is copied from https://github.com/go-kratos/kratos/blob/main/api/metadata/server.go
|
this file is copied from https://github.com/go-kratos/kratos/blob/main/api/metadata/server.go |
|
core
|
|
|
RBAC/Casbin
a RBAC auth check by casbin
|
a RBAC auth check by casbin |
|
resolver/discovery
In this file we define discorveryResolver struct and its methods, to replace the grpc resolver.Resolver interface by your own.
|
In this file we define discorveryResolver struct and its methods, to replace the grpc resolver.Resolver interface by your own. |
|
trace/exporter/jaeger
this is a modified version of jaeger exporter in https://github.com/zeromicro/go-zero/blob/master/core/trace/agent.go
|
this is a modified version of jaeger exporter in https://github.com/zeromicro/go-zero/blob/master/core/trace/agent.go |
|
example
|
|
|
GroupStart
command
|
|
|
GroupStart/rpc_client
command
|
|
|
features/Registry
command
|
|
|
features/metrics/rest
command
|
|
|
features/metrics/rpc
command
|
|
|
features/metrics/rpc/server
command
|
|
|
features/trace
command
|
|
|
features/trace/httpServer
command
|
|
|
features/trace/rpc/server
command
|
|
|
rest
command
|
|
|
rpc
command
|
|
|
pkg
|
|
|
auth-jwt
this file is modified from https://github.com/zeromicro/go-zero/blob/master/zrpc/internal/auth/auth.go
|
this file is modified from https://github.com/zeromicro/go-zero/blob/master/zrpc/internal/auth/auth.go |
|
errors
Package errors provides simple error handling primitives.
|
Package errors provides simple error handling primitives. |
|
errors/codgen
command
|
|
|
rest/rest-fiber/internal/auth
Basic Auth middleware
|
Basic Auth middleware |
|
rest/rest-fiber/internal/pprof
this is a copy of https://github.com/gofiber/fiber/blob/main/middleware/pprof/config.go
|
this is a copy of https://github.com/gofiber/fiber/blob/main/middleware/pprof/config.go |
|
rest/rest-gin/internal/auth
Basic Auth middleware
|
Basic Auth middleware |
|
rest/rest-gin/internal/pprof
this is a copy of "https://github.com/gin-contrib/pprof/blob/master/pprof.go
|
this is a copy of "https://github.com/gin-contrib/pprof/blob/master/pprof.go |
|
rpc/rpc-grpc/internal/serverinterceptors
auth check by jwt
|
auth check by jwt |
Click to show internal directories.
Click to hide internal directories.