Documentation ¶
Index ¶
- Variables
- func GetClientForHost(co *options.ClientOptions, newHost string) (*mongo.Client, error)
- func GetHostnames(ctx context.Context, client *mongo.Client) ([]string, error)
- func GetQueryField(doc proto.SystemProfile) (primitive.M, error)
- func GetReplicasetMembers(ctx context.Context, clientOptions *options.ClientOptions) ([]proto.Members, error)
- func GetServerStatus(ctx context.Context, client *mongo.Client) (proto.ServerStatus, error)
- func GetShardedHosts(ctx context.Context, client *mongo.Client) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CannotGetQueryError = errors.New("cannot get query field from the profile document (it is not a map)") ShardingNotEnabledError = errors.New("sharding not enabled") )
Functions ¶
func GetClientForHost ¶
GetClientForHost returns a new *mongo.Client using a copy of the original connection options where the host is being replaced by the newHost and the connection is set to be direct to the instance.
func GetQueryField ¶
func GetQueryField(doc proto.SystemProfile) (primitive.M, error)
func GetReplicasetMembers ¶
func GetServerStatus ¶
GetServerStatus returns the server status by running serverStatus and recordStats
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.