You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
624 B
26 lines
624 B
2 years ago
|
package polaris
|
||
|
|
||
|
import (
|
||
|
"github.com/polarismesh/polaris-go"
|
||
|
"github.com/polarismesh/polaris-go/api"
|
||
|
)
|
||
|
|
||
|
type Polaris struct {
|
||
|
router polaris.RouterAPI
|
||
|
config polaris.ConfigAPI
|
||
|
limit polaris.LimitAPI
|
||
|
registry polaris.ProviderAPI
|
||
|
discovery polaris.ConsumerAPI
|
||
|
}
|
||
|
|
||
|
// New polaris Service governance.
|
||
|
func New(sdk api.SDKContext) Polaris {
|
||
|
return Polaris{
|
||
|
router: polaris.NewRouterAPIByContext(sdk),
|
||
|
config: polaris.NewConfigAPIByContext(sdk),
|
||
|
limit: polaris.NewLimitAPIByContext(sdk),
|
||
|
registry: polaris.NewProviderAPIByContext(sdk),
|
||
|
discovery: polaris.NewConsumerAPIByContext(sdk),
|
||
|
}
|
||
|
}
|