ServerInterface is used to provide a standard set of methods a server module must support to work with Merlin
| 48 | |
| 49 | // ServerInterface is used to provide a standard set of methods a server module must support to work with Merlin |
| 50 | type ServerInterface interface { |
| 51 | Addr() string |
| 52 | ConfiguredOptions() map[string]string |
| 53 | ID() uuid.UUID |
| 54 | Interface() string |
| 55 | Listen() error |
| 56 | Protocol() int |
| 57 | ProtocolString() string |
| 58 | Port() int |
| 59 | SetOption(string, string) error |
| 60 | Start() |
| 61 | Status() string |
| 62 | Stop() error |
| 63 | } |
| 64 | |
| 65 | // Protocol is used to transform a server protocol constant into a string for use in written messages or logs |
| 66 | func Protocol(protocol int) string { |
no outgoing calls
no test coverage detected