Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: client/cmd/logdog_butler/streamserver_posix.go

Issue 2114253002: LogDog Butler: Catch SIGTERM on Linux. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/cmd/logdog_butler/main_windows.go ('k') | client/cmd/logdog_butler/streamserver_windows.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cmd/logdog_butler/streamserver_posix.go
diff --git a/client/cmd/logdog_butler/streamserver_posix.go b/client/cmd/logdog_butler/streamserver_posix.go
deleted file mode 100644
index eb2b2dba155d947d87d690f32db04a6db13320c7..0000000000000000000000000000000000000000
--- a/client/cmd/logdog_butler/streamserver_posix.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2015 The LUCI Authors. All rights reserved.
-// Use of this source code is governed under the Apache License, Version 2.0
-// that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package main
-
-import (
- "errors"
- "fmt"
-
- "github.com/luci/luci-go/client/internal/logdog/butler/streamserver"
- "golang.org/x/net/context"
-)
-
-const (
- // An example stream server URI.
- exampleStreamServerURI = streamServerURI("unix:/var/run/butler.sock")
-)
-
-type streamServerURI string
-
-func (u streamServerURI) Parse() (string, error) {
- typ, value := parseStreamServer(string(u))
- if typ != "unix" {
- return "", fmt.Errorf("unsupported URI scheme: [%s]", typ)
- }
- if value == "" {
- return "", errors.New("empty stream server path")
- }
- return value, nil
-}
-
-// Validates that the URI is correct for Windows.
-func (u streamServerURI) Validate() (err error) {
- _, err = u.Parse()
- return
-}
-
-// Create a POSIX (UNIX named pipe) stream server
-func createStreamServer(ctx context.Context, uri streamServerURI) streamserver.StreamServer {
- path, err := uri.Parse()
- if err != nil {
- panic("Failed to parse stream server URI.")
- }
- return streamserver.NewNamedPipeServer(ctx, path)
-}
« no previous file with comments | « client/cmd/logdog_butler/main_windows.go ('k') | client/cmd/logdog_butler/streamserver_windows.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698