1
0
mirror of https://github.com/rancher/norman.git synced 2025-06-30 09:12:19 +00:00
norman/types.go

73 lines
1.9 KiB
Go
Raw Normal View History

2018-10-22 17:52:23 +00:00
package norman
import (
"context"
"net/http"
"github.com/rancher/norman/api"
"github.com/rancher/norman/controller"
"github.com/rancher/norman/pkg/remotedialer"
"github.com/rancher/norman/store/proxy"
"github.com/rancher/norman/types"
"k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
)
type ClientFactory func(context.Context, rest.Config) (context.Context, controller.Starter, error)
type ControllerRegister func(ctx context.Context) error
type Config struct {
2018-10-31 17:18:47 +00:00
Name string
DisableAPI bool
Schemas []*types.Schemas
CRDs map[*types.APIVersion][]string
Clients []ClientFactory
ClientGetter proxy.ClientGetter
CRDStorageContext types.StorageContext
K8sClient kubernetes.Interface
APIExtClient clientset.Interface
Config *rest.Config
LeaderLockNamespace string
KubeConfig string
IgnoredKubeConfigEnv bool
Threadiness int
K3s K3sConfig
2018-10-22 17:52:23 +00:00
2018-11-09 17:05:15 +00:00
CustomizeSchemas func(context.Context, proxy.ClientGetter, *types.Schemas) error
GlobalSetup func(context.Context) (context.Context, error)
MasterSetup func(context.Context) (context.Context, error)
PreStart func(context.Context) error
APISetup func(context.Context, *api.Server) error
2018-10-22 17:52:23 +00:00
PerServerControllers []ControllerRegister
MasterControllers []ControllerRegister
}
type K3sConfig struct {
DataDir string
RemoteDialerAuthorizer remotedialer.Authorizer
}
type Server struct {
*Config
*Runtime
}
type Runtime struct {
AllSchemas *types.Schemas
LocalConfig *rest.Config
UnversionedClient rest.Interface
APIHandler http.Handler
K3sTunnelServer http.Handler
2018-10-31 17:18:47 +00:00
K3sServerConfig interface{}
2018-10-22 17:52:23 +00:00
Embedded bool
}
type Options struct {
2018-10-31 17:18:47 +00:00
KubeConfig string
2018-10-22 17:52:23 +00:00
K8sMode string
DisableControllers bool
}