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 provides functions for loading configurations and registering services.
Index ¶
- Variables
- func NewConfig(cfg *configv1.SourceConfig, opts ...config.Option) (config.Config, error)
- func NewDiscovery(cfg *configv1.Registry) (registry.Discovery, error)
- func NewRegistrar(cfg *configv1.Registry) (registry.Registrar, error)
- func RegisterConfig(name string, configBuilder ConfigBuilder)
- func RegisterConfigFunc(name string, buildFunc ConfigBuildFunc)
- func RegisterRegistry(name string, registryBuilder RegistryBuilder)
- type Builder
- type ConfigBuildFunc
- type ConfigBuilder
- type DiscoveryBuildFunc
- 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 NewDiscovery ¶
NewDiscovery creates a new Discovery using the registered RegistryBuilder.
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 ¶ added in v0.0.6
func RegisterConfigFunc(name string, buildFunc ConfigBuildFunc)
RegisterConfigFunc registers a ConfigBuilder with the builder.
func RegisterRegistry ¶
func RegisterRegistry(name string, registryBuilder RegistryBuilder)
RegisterRegistry registers a RegistryBuilder with the builder.
Types ¶
type Builder ¶
type Builder interface {
ConfigBuilder
RegistryBuilder
ServiceBuilder
// contains filtered or unexported methods
}
type ConfigBuildFunc ¶
ConfigBuildFunc is a function type that takes a SourceConfig and a list of Options and returns a Config and an error.
func (ConfigBuildFunc) NewConfig ¶
func (fn ConfigBuildFunc) NewConfig(cfg *configv1.SourceConfig, opts ...config.Option) (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(cfg *configv1.SourceConfig, opts ...config.Option) (config.Config, error)
}
ConfigBuilder is an interface that defines a method for creating a new config.
type DiscoveryBuildFunc ¶
DiscoveryBuildFunc is a function type that takes a *config.RegistryConfig and returns a registry.Discovery and an error.
func (DiscoveryBuildFunc) NewDiscovery ¶
NewDiscovery is a method that calls the DiscoveryBuildFunc with the given config.
type RegistrarBuildFunc ¶
RegistrarBuildFunc is a function type that takes a *config.RegistryConfig and returns a registry.Registrar and an error.
func (RegistrarBuildFunc) NewRegistrar ¶
NewRegistrar is a method that calls the RegistrarBuildFunc with the given config.
type RegistryBuilder ¶
type RegistryBuilder interface {
NewRegistrar(cfg *configv1.Registry) (registry.Registrar, error)
NewDiscovery(cfg *configv1.Registry) (registry.Discovery, error)
}
RegistryBuilder is an interface that defines methods for creating a Discovery and a Registrar.
type ServiceBuilder ¶ added in v0.0.7
type ServiceBuilder interface {
NewGRPCServer(cfg *configv1.Service) (*service.GRPCServer, error)
NewHTTPServer(cfg *configv1.Service) (*service.HTTPServer, error)
NewGRPCClient(cfg *configv1.Service) (*service.GRPCClient, error)
NewHTTPClient(cfg *configv1.Service) (*service.HTTPClient, error)
}
ServiceBuilder is an interface that defines a method for creating a new service.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bootstrap implements the functions, types, and interfaces for the module.
|
Package bootstrap implements the functions, types, and interfaces for the module. |
|
Package config implements the functions, types, and interfaces for the module.
|
Package config implements the functions, types, and interfaces for the module. |
|
Package database implements the functions, types, and interfaces for the module.
|
Package database implements the functions, types, and interfaces for the module. |
|
gen
|
|
|
kratos
module
|
|
|
Package log implements the functions, types, and interfaces for the module.
|
Package log 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. |
|
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 grpc implements the functions, types, and interfaces for the module.
|
Package grpc implements the functions, types, and interfaces for the module. |
|
transport
|
|
|
Package upload is the http multipart upload package
|
Package upload is the http multipart upload package |
|
Package validate implements the functions, types, and interfaces for the module.
|
Package validate implements the functions, types, and interfaces for the module. |