MCPcopy
hub / github.com/gliderlabs/ssh / SetOption

Method SetOption

server.go:379–388  ·  view source on GitHub ↗

SetOption runs a functional option against the server.

(option Option)

Source from the content-addressed store, hash-verified

377
378// SetOption runs a functional option against the server.
379func (srv *Server) SetOption(option Option) error {
380 // NOTE: there is a potential race here for any option that doesn't call an
381 // internal method. We can't actually lock here because if something calls
382 // (as an example) AddHostKey, it will deadlock.
383
384 //srv.mu.Lock()
385 //defer srv.mu.Unlock()
386
387 return option(srv)
388}
389
390func (srv *Server) getDoneChan() <-chan struct{} {
391 srv.mu.Lock()

Callers 4

TestPasswordAuthBadPassFunction · 0.95
ServeFunction · 0.95
ListenAndServeFunction · 0.95

Calls

no outgoing calls

Tested by 2

TestPasswordAuthBadPassFunction · 0.76