Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheConfig ¶
type Config ¶
type Config struct { BasePath string `json:"base_path"` ServicePath string `json:"service_path"` ServiceName string `json:"service_name"` ServiceAddr string `json:"service_addr"` RegistryConfig RegistryConfig `json:"registry_config"` RateLimit int64 `json:"rate_limit"` DatabaseConfig map[string]DatabaseConfig `json:"database_config"` CacheConfig CacheConfig `json:"cache_config"` TokenConfig TokenConfig `json:"token_config"` }
type DatabaseConfig ¶
type DatabaseConfig struct { Driver string `json:"driver"` Host string `json:"host"` Port int `json:"port"` Username string `json:"username"` Password string `json:"password"` Database string `json:"database"` Sources []DatabaseConnect `json:"sources"` Replicas []DatabaseConnect `json:"replicas"` }
DatabaseConfig 数据库配置
type DatabaseConnect ¶
type HttpResponse ¶
type Method ¶
type Method struct { Name string `json:"name"` Router string `json:"router"` Func func(ctx context.Context, res *Request, req *Response) error `json:"func"` }
Method 服务结构
type RegistryConfig ¶
RegistryConfig 服务发现配置
Click to show internal directories.
Click to hide internal directories.