Skip to content

Commit 3973cf5

Browse files
author
Jacob Moody
committed
Add AuthOpen func for styx.Server
1 parent 96cf931 commit 3973cf5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ type Logger interface {
1616
Printf(string, ...interface{})
1717
}
1818

19+
type AuthOpenFunc func() (interface{}, error)
20+
1921
// A Server defines parameters for running a 9P server. The
2022
// zero value of a Server is usable as a 9P server, and will
2123
// use the defaults set by the styx package.
@@ -42,6 +44,9 @@ type Server struct {
4244
// authentication is disabled.
4345
Auth AuthFunc
4446

47+
// OpenAuth is used to open file to authentication agent
48+
OpenAuth AuthOpenFunc
49+
4550
// If not nil, ErrorLog will be used to log unexpected
4651
// errors accepting or handling connections. TraceLog,
4752
// if not nil, will receive detailed protocol tracing

0 commit comments

Comments
 (0)