blob: 4d8976d96a63e4b72b2f4ce02a8093789cb98cc2 [file] [log] [blame]
Don Newton379ae252019-04-01 12:17:06 -04001// 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
7package connection
8
9const defaultPort = "27017"
10
11// Addr is a network address. It can be either an IP address or a DNS name.
12type Addr string
13
14// Network is the network protcol for this address. In most cases this will be "tcp" or "unix".
15func (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
18func (Addr) String() string { return "" }
19
20// Canonicalize creates a canonicalized address.
21func (Addr) Canonicalize() Addr { return Addr("") }