feat: bootstrap control plane app skeleton
This commit is contained in:
16
internal/app/bootstrap.go
Normal file
16
internal/app/bootstrap.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"sub2api-cn-relay-manager/internal/config"
|
||||
)
|
||||
|
||||
func Bootstrap(_ context.Context) (*Server, error) {
|
||||
cfg, err := config.LoadStartupFromEnv()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return NewServer(cfg.Server.ListenAddr, nil), nil
|
||||
}
|
||||
Reference in New Issue
Block a user