Documentation
¶
Index ¶
- Constants
- Variables
- func GetRunModel() string
- func GetServiceName() string
- func InitConfiguration(ctx context.Context, serviceInfo ServiceInfo)
- func PrintVersionInfo()
- func RegisterOnConfigChange(onConfigChange func())
- func SetRunModel(runModel string)
- func UnmarshalKeyFormJson(key string, body interface{}) error
- type RPCService
- type RemoteConfigProvide
- type ServiceInfo
- type ServiceRegisterInfo
Constants ¶
View Source
const ( Model_dev = "dev" Model_test = "test" Model_product = "prod" )
Variables ¶
View Source
var ( // BuildVersion = "" GitRev = "" GitTag = "" BuildTime = "" Version = "" )
View Source
var EnableRemoteLog = false
Functions ¶
func GetRunModel ¶
func GetRunModel() string
func GetServiceName ¶
func GetServiceName() string
func InitConfiguration ¶
func InitConfiguration(ctx context.Context, serviceInfo ServiceInfo)
func PrintVersionInfo ¶
func PrintVersionInfo()
func RegisterOnConfigChange ¶
func RegisterOnConfigChange(onConfigChange func())
func SetRunModel ¶
func SetRunModel(runModel string)
func UnmarshalKeyFormJson ¶
Types ¶
type RPCService ¶
type RPCService interface { GetRPCServiceInfo() ServiceInfo InitRPCService(ctx context.Context, grpcConn *grpc.ClientConn) error }
type RemoteConfigProvide ¶
type ServiceInfo ¶
type ServiceInfo struct { ServiceName string `mapstructure:"service_name,omitempty" json:"service_name,omitempty"` Version string `mapstructure:"version,omitempty" json:"version,omitempty"` Descriptor string `mapstructure:"descriptor,omitempty" json:"descriptor,omitempty"` APIDefine string `mapstructure:"api_define,omitempty" json:"api_define,omitempty"` Metadata map[string]string `mapstructure:"metadata,omitempty" json:"metadata,omitempty"` TargetUrl string `mapstructure:"target_url,omitempty" json:"target_url,omitempty"` }
func GetServiceInfo ¶
func GetServiceInfo() ServiceInfo
type ServiceRegisterInfo ¶
type ServiceRegisterInfo struct { Info ServiceInfo `json:"info"` ServiceAddr string `json:"service_addr"` ManageEndpoint string `json:"manage_endpoint"` Metadata map[string]string `json:"metadata,omitempty"` }
Click to show internal directories.
Click to hide internal directories.