Documentation
¶
Index ¶
- Variables
- type InProcessServer
- func (s *InProcessServer) Artifact(t kcptestingserver.TestingT, producer func() (runtime.Object, error))
- func (s *InProcessServer) BaseConfig(t kcptestingserver.TestingT) *rest.Config
- func (s *InProcessServer) CADirectory() string
- func (s *InProcessServer) ClientCAUserConfig(t kcptestingserver.TestingT, config *rest.Config, name string, ...) *rest.Config
- func (s *InProcessServer) KubeconfigPath() string
- func (s *InProcessServer) Name() string
- func (s *InProcessServer) RESTConfig(t kcptestingserver.TestingT, context string) *rest.Config
- func (s *InProcessServer) RawConfig() (clientcmdapi.Config, error)
- func (s *InProcessServer) RawConfigFatal(t kcptestingserver.TestingT) clientcmdapi.Config
- func (s *InProcessServer) RootShardSystemMasterBaseConfig(t kcptestingserver.TestingT) *rest.Config
- func (s *InProcessServer) ShardNames() []string
- func (s *InProcessServer) ShardSystemMasterBaseConfig(t kcptestingserver.TestingT, shard string) *rest.Config
- func (s *InProcessServer) Start(ctx context.Context, t kcptestingserver.TestingT)
- func (s *InProcessServer) Stop()
- func (s *InProcessServer) Stopped() bool
- func (s *InProcessServer) Wait(t kcptestingserver.TestingT)
Constants ¶
This section is empty.
Variables ¶
View Source
var ContextRunInProcess kcptestingserver.KcpRunner = func(ctx context.Context, t kcptestingserver.TestingT, cfg kcptestingserver.Config) (<-chan struct{}, error) { s := NewInProcessServer(t) s.Config = cfg s.Start(ctx, t) s.Wait(t) return s.StopCh, nil }
Functions ¶
This section is empty.
Types ¶
type InProcessServer ¶
type InProcessServer struct {
Config kcptestingserver.Config
Server *kcpserver.Server
StopCh chan struct{}
ClientConfig clientcmd.ClientConfig
// contains filtered or unexported fields
}
func NewInProcessServer ¶
func NewInProcessServer(t kcptestingserver.TestingT, opts ...kcptestingserver.Option) *InProcessServer
func StartTestServer ¶
func StartTestServer(t kcptestingserver.TestingT, opts ...kcptestingserver.Option) (*InProcessServer, kcpclientset.ClusterInterface, kcpkubernetesclientset.ClusterInterface)
StartTestServer starts a KCP server for testing purposes.
func (*InProcessServer) Artifact ¶
func (s *InProcessServer) Artifact(t kcptestingserver.TestingT, producer func() (runtime.Object, error))
func (*InProcessServer) BaseConfig ¶
func (s *InProcessServer) BaseConfig(t kcptestingserver.TestingT) *rest.Config
func (*InProcessServer) CADirectory ¶
func (s *InProcessServer) CADirectory() string
func (*InProcessServer) ClientCAUserConfig ¶
func (s *InProcessServer) ClientCAUserConfig(t kcptestingserver.TestingT, config *rest.Config, name string, groups ...string) *rest.Config
func (*InProcessServer) KubeconfigPath ¶
func (s *InProcessServer) KubeconfigPath() string
func (*InProcessServer) Name ¶
func (s *InProcessServer) Name() string
func (*InProcessServer) RESTConfig ¶
func (s *InProcessServer) RESTConfig(t kcptestingserver.TestingT, context string) *rest.Config
func (*InProcessServer) RawConfig ¶
func (s *InProcessServer) RawConfig() (clientcmdapi.Config, error)
func (*InProcessServer) RawConfigFatal ¶
func (s *InProcessServer) RawConfigFatal(t kcptestingserver.TestingT) clientcmdapi.Config
func (*InProcessServer) RootShardSystemMasterBaseConfig ¶
func (s *InProcessServer) RootShardSystemMasterBaseConfig(t kcptestingserver.TestingT) *rest.Config
func (*InProcessServer) ShardNames ¶
func (s *InProcessServer) ShardNames() []string
func (*InProcessServer) ShardSystemMasterBaseConfig ¶
func (s *InProcessServer) ShardSystemMasterBaseConfig(t kcptestingserver.TestingT, shard string) *rest.Config
func (*InProcessServer) Start ¶
func (s *InProcessServer) Start(ctx context.Context, t kcptestingserver.TestingT)
func (*InProcessServer) Stop ¶
func (s *InProcessServer) Stop()
func (*InProcessServer) Stopped ¶
func (s *InProcessServer) Stopped() bool
func (*InProcessServer) Wait ¶
func (s *InProcessServer) Wait(t kcptestingserver.TestingT)
Click to show internal directories.
Click to hide internal directories.