コード例 #1
0
ファイル: http.go プロジェクト: crackcomm/go-actions
func init() {
	server.Register("http", func(address string, r runner.Runner, auth ...string) (server.Server, error) {
		srv := NewServer(r)
		srv.Server.Addr = address
		if len(auth) >= 2 {
			srv.certFile = auth[0]
			srv.keyFile = auth[1]
		}
		return srv, nil
	})
}
コード例 #2
0
ファイル: worker_test.go プロジェクト: crackcomm/go-actions
func init() {
	server.Register("test", func(_ string, _ runner.Runner, _ ...string) (server.Server, error) {
		return new(testServer), nil
	})
}