INNER CODE UNIT · Go

start

kcp-dev/kcp · cmd/test-server/main.go:85

func start(shardFlags []string, workDirPath, logDirPath string, quiet bool) error {
	// We use a shutdown context to know that it's time to gather metrics, before stopping the shard
	shutdownCtx, shutdownCancel := context.WithCancel(genericapiserver.SetupSignalContext())
	defer shutdownCancel()

	// This context controls the life of the shard
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	// create client CA and kcp-admin client cert to connect through front-proxy
	_, err := crypto.MakeSelfSignedCA(
		filepath.Join(workDirPath, ".kcp", "client-ca.crt"),
		filepath.Join(workDirPath, ".kcp", "client-ca.key"),
		filepath.Join(workDirPath, ".kcp", "client-ca-serial.txt"),
		"kcp-client-ca",
		365,
	)
	if err != nil {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…