Documentation ¶
Overview ¶
Package runtime implements the functions, types, and interfaces for the module.
Package runtime implements the functions, types, and interfaces for the module.
Package runtime implements the functions, types, and interfaces for the module.
Package runtime implements the functions, types, and interfaces for the module.
Package runtime implements the functions, types, and interfaces for the module.
Package runtime implements the functions, types, and interfaces for the module.
Package runtime provides functions for loading configurations and registering services.
Index ¶
- Variables
- func NewConfig(cfg *configv1.SourceConfig, ss ...config.SourceOptionSetting) (config.Config, error)
- func NewDiscovery(cfg *configv1.Registry, ss ...registry.OptionSetting) (registry.Discovery, error)
- func NewGRPCServiceClient(ctx context.Context, cfg *configv1.Service, ss ...service.OptionSetting) (*service.GRPCClient, error)
- func NewGRPCServiceServer(cfg *configv1.Service, ss ...service.OptionSetting) (*service.GRPCServer, error)
- func NewHTTPServiceClient(ctx context.Context, cfg *configv1.Service, ss ...service.OptionSetting) (*service.HTTPClient, error)
- func NewHTTPServiceServer(cfg *configv1.Service, ss ...service.OptionSetting) (*service.HTTPServer, error)
- func NewMiddlewareClient(name string, cm *configv1.Customize_Config, ss ...middleware.OptionSetting) (middleware.Middleware, error)
- func NewMiddlewareServer(name string, cm *configv1.Customize_Config, ss ...middleware.OptionSetting) (middleware.Middleware, error)
- func NewMiddlewaresClient(cc *configv1.Customize, ss ...middleware.OptionSetting) []middleware.Middleware
- func NewMiddlewaresServer(cc *configv1.Customize, ss ...middleware.OptionSetting) []middleware.Middleware
- func NewRegistrar(cfg *configv1.Registry, ss ...registry.OptionSetting) (registry.Registrar, error)
- func RegisterConfig(name string, configBuilder ConfigBuilder)
- func RegisterConfigFunc(name string, buildFunc ConfigBuildFunc)
- func RegisterConfigSync(name string, syncFunc ConfigSyncFunc)
- func RegisterMiddleware(name string, middlewareBuilder MiddlewareBuilder)
- func RegisterRegistry(name string, registryBuilder RegistryBuilder)
- func RegisterService(name string, serviceBuilder ServiceBuilder)
- func SyncConfig(cfg *configv1.SourceConfig, v any, ss ...config.SourceOptionSetting) error
- type Builder
- type ConfigBuildFunc
- type ConfigBuilder
- type ConfigSyncFunc
- type ConfigSyncer
- type DiscoveryBuildFunc
- type MiddlewareBuildFunc
- type MiddlewareBuilder
- type MiddlewareBuilders
- type RegistrarBuildFunc
- type RegistryBuilder
- type ServiceBuilder
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.String("not found")
ErrNotFound is an error that is returned when a ConfigBuilder or RegistryBuilder is not found.
Functions ¶
func NewConfig ¶
func NewConfig(cfg *configv1.SourceConfig, ss ...config.SourceOptionSetting) (config.Config, error)
NewConfig creates a new Selector using the registered ConfigBuilder.
func NewDiscovery ¶
NewDiscovery creates a new discovery using the registered RegistryBuilder.
func NewGRPCServiceClient ¶
func NewGRPCServiceClient(ctx context.Context, cfg *configv1.Service, ss ...service.OptionSetting) (*service.GRPCClient, error)
NewGRPCServiceClient creates a new GRPC client using the provided context and configuration
func NewGRPCServiceServer ¶
func NewGRPCServiceServer(cfg *configv1.Service, ss ...service.OptionSetting) (*service.GRPCServer, error)
NewGRPCServiceServer creates a new GRPC server using the provided configuration
func NewHTTPServiceClient ¶
func NewHTTPServiceClient(ctx context.Context, cfg *configv1.Service, ss ...service.OptionSetting) (*service.HTTPClient, error)
NewHTTPServiceClient creates a new HTTP client using the provided context and configuration
func NewHTTPServiceServer ¶
func NewHTTPServiceServer(cfg *configv1.Service, ss ...service.OptionSetting) (*service.HTTPServer, error)
NewHTTPServiceServer creates a new HTTP server using the provided configuration
func NewMiddlewareClient ¶
func NewMiddlewareClient(name string, cm *configv1.Customize_Config, ss ...middleware.OptionSetting) (middleware.Middleware, error)
NewMiddlewareClient creates a new Middleware with the builder.
func NewMiddlewareServer ¶
func NewMiddlewareServer(name string, cm *configv1.Customize_Config, ss ...middleware.OptionSetting) (middleware.Middleware, error)
NewMiddlewareServer creates a new Middleware with the builder.
func NewMiddlewaresClient ¶
func NewMiddlewaresClient(cc *configv1.Customize, ss ...middleware.OptionSetting) []middleware.Middleware
NewMiddlewaresClient creates a new Middleware with the builder.
func NewMiddlewaresServer ¶
func NewMiddlewaresServer(cc *configv1.Customize, ss ...middleware.OptionSetting) []middleware.Middleware
NewMiddlewaresServer creates a new Middleware with the builder.
func NewRegistrar ¶
NewRegistrar creates a new Registrar using the registered RegistryBuilder.
func RegisterConfig ¶
func RegisterConfig(name string, configBuilder ConfigBuilder)
RegisterConfig registers a ConfigBuilder with the builder.
func RegisterConfigFunc ¶
func RegisterConfigFunc(name string, buildFunc ConfigBuildFunc)
RegisterConfigFunc registers a ConfigBuilder with the builder.
func RegisterConfigSync ¶
func RegisterConfigSync(name string, syncFunc ConfigSyncFunc)
func RegisterMiddleware ¶
func RegisterMiddleware(name string, middlewareBuilder MiddlewareBuilder)
RegisterMiddleware registers a MiddlewareBuilder with the builder.
func RegisterRegistry ¶
func RegisterRegistry(name string, registryBuilder RegistryBuilder)
RegisterRegistry registers a RegistryBuilder with the builder.
func RegisterService ¶
func RegisterService(name string, serviceBuilder ServiceBuilder)
RegisterService registers a service builder with the provided name
func SyncConfig ¶
func SyncConfig(cfg *configv1.SourceConfig, v any, ss ...config.SourceOptionSetting) error
SyncConfig synchronizes the given configuration with the given value.
Types ¶
type Builder ¶
type Builder interface { ConfigBuilder RegistryBuilder ServiceBuilder MiddlewareBuilders // contains filtered or unexported methods }
type ConfigBuildFunc ¶
type ConfigBuildFunc func(*configv1.SourceConfig, ...config.SourceOptionSetting) (config.Config, error)
ConfigBuildFunc is a function type that takes a SourceConfig and a list of Options and returns a Selector and an error.
func (ConfigBuildFunc) NewConfig ¶
func (fn ConfigBuildFunc) NewConfig(cfg *configv1.SourceConfig, ss ...config.SourceOptionSetting) (config.Config, error)
NewConfig is a method that implements the ConfigBuilder interface for ConfigBuildFunc.
type ConfigBuilder ¶
type ConfigBuilder interface { // NewConfig creates a new config using the given SourceConfig and a list of Options. NewConfig(*configv1.SourceConfig, ...config.SourceOptionSetting) (config.Config, error) }
ConfigBuilder is an interface that defines a method for creating a new config.
type ConfigSyncFunc ¶
type ConfigSyncFunc func(*configv1.SourceConfig, any, ...config.SourceOptionSetting) error
ConfigSyncFunc is a function type that takes a SourceConfig and a list of Options and returns an error.
func (ConfigSyncFunc) SyncConfig ¶
func (fn ConfigSyncFunc) SyncConfig(cfg *configv1.SourceConfig, v any, ss ...config.SourceOptionSetting) error
SyncConfig is a method that implements the ConfigSyncer interface for ConfigSyncFunc.
type ConfigSyncer ¶
type ConfigSyncer interface {
SyncConfig(*configv1.SourceConfig, any, ...config.SourceOptionSetting) error
}
ConfigSyncer is an interface that defines a method for synchronizing a config.
type DiscoveryBuildFunc ¶
type DiscoveryBuildFunc func(*configv1.Registry, ...registry.OptionSetting) (registry.Discovery, error)
DiscoveryBuildFunc is a function type that takes a *config.RegistryConfig and returns a registry.discovery and an error.
func (DiscoveryBuildFunc) NewDiscovery ¶
func (fn DiscoveryBuildFunc) NewDiscovery(cfg *configv1.Registry, ss ...registry.OptionSetting) (registry.Discovery, error)
NewDiscovery is a method that calls the DiscoveryBuildFunc with the given config.
type MiddlewareBuildFunc ¶
type MiddlewareBuildFunc = func(*configv1.Customize_Config, ...middleware.OptionSetting) (middleware.Middleware, error)
MiddlewareBuildFunc is an interface that defines methods for creating middleware.
type MiddlewareBuilder ¶
type MiddlewareBuilder interface { // NewMiddlewareClient build middleware NewMiddlewareClient(*configv1.Customize_Config, ...middleware.OptionSetting) (middleware.Middleware, error) // NewMiddlewareServer build middleware NewMiddlewareServer(*configv1.Customize_Config, ...middleware.OptionSetting) (middleware.Middleware, error) }
MiddlewareBuilder middleware builder interface
type MiddlewareBuilders ¶
type MiddlewareBuilders interface { // NewMiddlewaresClient build middleware NewMiddlewaresClient([]middleware.Middleware, *configv1.Customize, ...middleware.OptionSetting) []middleware.Middleware // NewMiddlewaresServer build middleware NewMiddlewaresServer([]middleware.Middleware, *configv1.Customize, ...middleware.OptionSetting) []middleware.Middleware // NewMiddlewareClient build middleware NewMiddlewareClient(string, *configv1.Customize_Config, ...middleware.OptionSetting) (middleware.Middleware, error) // NewMiddlewareServer build middleware NewMiddlewareServer(string, *configv1.Customize_Config, ...middleware.OptionSetting) (middleware.Middleware, error) }
MiddlewareBuilders middleware builders for runtime
type RegistrarBuildFunc ¶
type RegistrarBuildFunc func(*configv1.Registry, ...registry.OptionSetting) (registry.Registrar, error)
RegistrarBuildFunc is a function type that takes a *config.RegistryConfig and returns a registry.Registrar and an error.
func (RegistrarBuildFunc) NewRegistrar ¶
func (fn RegistrarBuildFunc) NewRegistrar(cfg *configv1.Registry, ss ...registry.OptionSetting) (registry.Registrar, error)
NewRegistrar is a method that calls the RegistrarBuildFunc with the given config.
type RegistryBuilder ¶
type RegistryBuilder interface { NewRegistrar(*configv1.Registry, ...registry.OptionSetting) (registry.Registrar, error) NewDiscovery(*configv1.Registry, ...registry.OptionSetting) (registry.Discovery, error) }
RegistryBuilder is an interface that defines methods for creating a discovery and a Registrar.
type ServiceBuilder ¶
type ServiceBuilder interface { NewGRPCServer(*configv1.Service, ...service.OptionSetting) (*service.GRPCServer, error) NewHTTPServer(*configv1.Service, ...service.OptionSetting) (*service.HTTPServer, error) NewGRPCClient(context.Context, *configv1.Service, ...service.OptionSetting) (*service.GRPCClient, error) NewHTTPClient(context.Context, *configv1.Service, ...service.OptionSetting) (*service.HTTPClient, error) }
ServiceBuilder is an interface that defines a method for creating a new service.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package bootstrap is a package that provides the bootstrap information for the service.
|
Package bootstrap is a package that provides the bootstrap information for the service. |
Package config implements the functions, types, and interfaces for the module.
|
Package config implements the functions, types, and interfaces for the module. |
Package context provides the context functions
|
Package context provides the context functions |
Package customize implements the functions, types, and interfaces for the module.
|
Package customize implements the functions, types, and interfaces for the module. |
Package data implements the functions, types, and interfaces for the module.
|
Package data implements the functions, types, and interfaces for the module. |
Package fileupload implements the functions, types, and interfaces for the module.
|
Package fileupload implements the functions, types, and interfaces for the module. |
gen
|
|
Package log implements the functions, types, and interfaces for the module.
|
Package log implements the functions, types, and interfaces for the module. |
Package mail implements the functions, types, and interfaces for the module.
|
Package mail implements the functions, types, and interfaces for the module. |
Package middleware implements the functions, types, and interfaces for the module.
|
Package middleware implements the functions, types, and interfaces for the module. |
empty
Package empty implements the functions, types, and interfaces for the module.
|
Package empty implements the functions, types, and interfaces for the module. |
optimize
Package optimize implements the functions, types, and interfaces for the module.
|
Package optimize implements the functions, types, and interfaces for the module. |
security
Package security implements the functions, types, and interfaces for the module.
|
Package security implements the functions, types, and interfaces for the module. |
security/authn/jwt
Package jwt implements the functions, types, and interfaces for the module.
|
Package jwt implements the functions, types, and interfaces for the module. |
security/authz/casbin
Package casbin implements the functions, types, and interfaces for the module.
|
Package casbin implements the functions, types, and interfaces for the module. |
security/internal/helper
Package helper implements the functions, types, and interfaces for the module.
|
Package helper implements the functions, types, and interfaces for the module. |
security/internal/model
Package model embedding the model files for Casbin.
|
Package model embedding the model files for Casbin. |
security/internal/policy
Package policy embedding the policy files for Casbin.
|
Package policy embedding the policy files for Casbin. |
validate
Package validate implements the functions, types, and interfaces for the module.
|
Package validate implements the functions, types, and interfaces for the module. |
Package registry implements the functions, types, and interfaces for the module.
|
Package registry implements the functions, types, and interfaces for the module. |
Package service implements the functions, types, and interfaces for the module.
|
Package service implements the functions, types, and interfaces for the module. |
grpc
Package grpc implements the functions, types, and interfaces for the module.
|
Package grpc implements the functions, types, and interfaces for the module. |
http
Package http implements the functions, types, and interfaces for the module.
|
Package http implements the functions, types, and interfaces for the module. |
selector
Package selector implements the functions, types, and interfaces for the module.
|
Package selector implements the functions, types, and interfaces for the module. |