Path: blob/main/components/ws-daemon/cmd/content-initializer/main.go
2500 views
// Copyright (c) 2020 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34package main56import (7"fmt"8"math/rand"9"os"10"time"1112"github.com/gitpod-io/gitpod/common-go/log"13"github.com/gitpod-io/gitpod/common-go/tracing"14"github.com/gitpod-io/gitpod/ws-daemon/pkg/content"15)1617func main() {18rand.Seed(time.Now().UnixNano())1920log.Init("content-initializer", "", true, false)21tracing.Init("content-initializer")2223statsFd := os.NewFile(content.RUN_INITIALIZER_CHILD_STATS_FD, "stats")2425err := content.RunInitializerChild(statsFd)26if err != nil {27errfd := os.NewFile(content.RUN_INITIALIZER_CHILD_ERROUT_FD, "errout")28_, _ = fmt.Fprintf(errfd, "%s", err.Error())2930os.Exit(content.FAIL_CONTENT_INITIALIZER_EXIT_CODE)31}32}333435