Don Newton | 379ae25 | 2019-04-01 12:17:06 -0400 | [diff] [blame^] | 1 | // Copyright (C) MongoDB, Inc. 2017-present. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | // not use this file except in compliance with the License. You may obtain |
| 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | |
| 7 | package connection |
| 8 | |
| 9 | const defaultPort = "27017" |
| 10 | |
| 11 | // Addr is a network address. It can be either an IP address or a DNS name. |
| 12 | type Addr string |
| 13 | |
| 14 | // Network is the network protcol for this address. In most cases this will be "tcp" or "unix". |
| 15 | func (Addr) Network() string { return "" } |
| 16 | |
| 17 | // String is the canonical version of this address, e.g. localhost:27017, 1.2.3.4:27017, example.com:27017 |
| 18 | func (Addr) String() string { return "" } |
| 19 | |
| 20 | // Canonicalize creates a canonicalized address. |
| 21 | func (Addr) Canonicalize() Addr { return Addr("") } |