INNER CODE UNIT · Go

init

go-chassis/go-chassis · chassis_api.go:49

func init() {
	goChassis = &chassis{}
}

// RegisterSchema Register a API service to specific server by name
// You must register API first before Call Init
func RegisterSchema(serverName string, structPtr interface{}, opts ...server.RegisterOption) {
	goChassis.registerSchema(serverName, structPtr, opts...)
}

// SetDefaultConsumerChains your custom chain map for Consumer,if there is no config, this default chain will take affect
func SetDefaultConsumerChains(c map[string]string) {
	goChassis.DefaultConsumerChainNames = c
}

// SetDefaultProviderChains set your custom chain map for Provider,if there is no config, this default chain will take affect
func SetDefaultProviderChains(c map[string]string) {
	goChassis.DefaultProviderChainNames = c

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…