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

Side by Side Diff: logdog/client/butlerlib/streamclient/client_namedPipe_posix.go

Issue 2456953003: LogDog: Update client/bootstrap to generate URLs. (Closed)
Patch Set: Winders Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 // +build darwin dragonfly freebsd linux netbsd openbsd 5 // +build darwin dragonfly freebsd linux netbsd openbsd
6 6
7 package streamclient 7 package streamclient
8 8
9 import ( 9 import (
10 "fmt" 10 "fmt"
(...skipping 14 matching lines...) Expand all
25 func newUnixSocketClient(path string) (Client, error) { 25 func newUnixSocketClient(path string) (Client, error) {
26 // Ensure that the supplied path exists and is a named pipe. 26 // Ensure that the supplied path exists and is a named pipe.
27 info, err := os.Lstat(path) 27 info, err := os.Lstat(path)
28 if err != nil { 28 if err != nil {
29 return nil, fmt.Errorf("failed to stat file [%s]: %s", path, err ) 29 return nil, fmt.Errorf("failed to stat file [%s]: %s", path, err )
30 } 30 }
31 if info.Mode()&os.ModeSocket == 0 { 31 if info.Mode()&os.ModeSocket == 0 {
32 return nil, fmt.Errorf("not a named pipe: [%s]", path) 32 return nil, fmt.Errorf("not a named pipe: [%s]", path)
33 } 33 }
34 34
35 » return &clientImpl{func() (io.WriteCloser, error) { 35 » return &clientImpl{
36 » » return net.Dial("unix", path) 36 » » factory: func() (io.WriteCloser, error) {
37 » }}, nil 37 » » » return net.Dial("unix", path)
38 » » },
39 » }, nil
38 } 40 }
OLDNEW
« no previous file with comments | « logdog/client/butlerlib/streamclient/client.go ('k') | logdog/client/butlerlib/streamclient/client_namedPipe_windows.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698