Services sets the list of services implemented by a server. Services must appear in a Server expression. Services takes one or more strings as argument corresponding to service names. Example: var _ = Server("calcsvr", func() { Services("calc", "adder") Services("other") // Multiple c
(svcs ...string)
| 87 | // Services("other") // Multiple calls to Services are OK |
| 88 | // }) |
| 89 | func Services(svcs ...string) { |
| 90 | s, ok := eval.Current().(*expr.ServerExpr) |
| 91 | if !ok { |
| 92 | eval.IncompatibleDSL() |
| 93 | return |
| 94 | } |
| 95 | s.Services = append(s.Services, svcs...) |
| 96 | } |
| 97 | |
| 98 | // Host defines a server host. A single server may define multiple hosts. Each |
| 99 | // host lists the set of URIs that identify it. |
no test coverage detected