-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
65 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//go:build !dqlite | ||
|
||
package cmd | ||
|
||
import "fmt" | ||
|
||
func printVersions() error { | ||
return fmt.Errorf("dqlite is not supported, compile with \"-tags dqlite\"") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
//go:build dqlite | ||
|
||
package server | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
//go:build !dqlite | ||
|
||
package server | ||
|
||
import ( | ||
"context" | ||
"errors" | ||
"time" | ||
) | ||
|
||
var errNoDqlite = errors.New("dqlite is not supported, compile with \"-tags dqlite\"") | ||
var closedCh = make(chan struct{}) | ||
|
||
func init() { | ||
close(closedCh) | ||
} | ||
|
||
type Server struct{} | ||
|
||
func (*Server) Start(ctx context.Context) error { return errNoDqlite } | ||
func (*Server) MustStop() <-chan struct{} { return closedCh } | ||
func (*Server) Shutdown(ctx context.Context) error { return errNoDqlite } | ||
|
||
func New( | ||
dir string, | ||
listen string, | ||
enableTLS bool, | ||
diskMode bool, | ||
clientSessionCacheSize uint, | ||
minTLSVersion string, | ||
watchAvailableStorageInterval time.Duration, | ||
watchAvailableStorageMinBytes uint64, | ||
lowAvailableStorageAction string, | ||
admissionControlPolicy string, | ||
admissionControlPolicyLimitMaxConcurrentTxn int64, | ||
admissionControlOnlyWriteQueries bool, | ||
) (*Server, error) { | ||
return nil, errNoDqlite | ||
} |