Skip to content

Commit

Permalink
Disable webserver code with build flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkw31 committed Aug 22, 2024
1 parent c0cc649 commit cf506d7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ install:
@go install -tags netgo ${LDFLAGS}
@echo Installed to ${GOPATH}/bin/wrstat

installnonpm: export CGO_ENABLED = 1
installnonpm:
installnoserver: export CGO_ENABLED = 1
installnoserver:
@rm -f ${GOPATH}/bin/wrstat
@go install -tags netgo ${LDFLAGS}
@go install -tags netgo,noserver ${LDFLAGS}
@echo installed to ${GOPATH}/bin/wrstat

test: export CGO_ENABLED = 1
Expand Down
24 changes: 14 additions & 10 deletions cmd/server.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build !noserver
// +build !noserver

/*******************************************************************************
* Copyright (c) 2022, 2023 Genome Research Ltd.
*
Expand Down Expand Up @@ -42,18 +45,19 @@ import (
)

const sentinelPollFrequencty = 1 * time.Minute
const serverTokenBasename = ".wrstat.servertoken"

// options for this cmd.
var serverLogPath string
var serverBind string
var serverCert string
var serverKey string
var oktaURL string
var oktaOAuthIssuer string
var oktaOAuthClientID string
var oktaOAuthClientSecret string
var areasPath string
var (
serverLogPath string
serverBind string
serverCert string
serverKey string
oktaURL string
oktaOAuthIssuer string
oktaOAuthClientID string
oktaOAuthClientSecret string
areasPath string
)

// serverCmd represents the server command.
var serverCmd = &cobra.Command{
Expand Down
13 changes: 7 additions & 6 deletions cmd/where.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ type Error string
func (e Error) Error() string { return string(e) }

const (
defaultWhereSplits = 2
defaultSize = "50M"
hoursPerDay = 24
jwtBasename = ".wrstat.jwt"
errBadGroupArea = Error("unknown group area")
privatePerms os.FileMode = 0600
defaultWhereSplits = 2
defaultSize = "50M"
hoursPerDay = 24
jwtBasename = ".wrstat.jwt"
errBadGroupArea = Error("unknown group area")
privatePerms os.FileMode = 0600
serverTokenBasename = ".wrstat.servertoken"
)

// options for this cmd.
Expand Down

0 comments on commit cf506d7

Please sign in to comment.