Class ConnectionConfiguration
Allows you to control how Open
Inherited Members
Namespace: OpenSearch .Net
Assembly: OpenSearch.Net.dll
Syntax
public class ConnectionConfiguration : ConnectionConfiguration<ConnectionConfiguration>, IConnectionConfigurationValues, IDisposable
Constructors
| Edit this page View SourceConnectionConfiguration(IConnectionPool)
Creates a new instance of Connection
Declaration
public ConnectionConfiguration(IConnectionPool connectionPool)
Parameters
Type | Name | Description |
---|---|---|
IConnection |
connectionPool | A connection pool implementation that tells the client what nodes are available |
ConnectionConfiguration(IConnectionPool, IConnection)
Creates a new instance of Connection
Declaration
public ConnectionConfiguration(IConnectionPool connectionPool, IConnection connection)
Parameters
Type | Name | Description |
---|---|---|
IConnection |
connectionPool | A connection pool implementation that tells the client what nodes are available |
IConnection | connection | An connection implementation that can make API requests |
ConnectionConfiguration(IConnectionPool, IConnection, IOpenSearchSerializer)
Creates a new instance of Connection
Declaration
public ConnectionConfiguration(IConnectionPool connectionPool, IConnection connection, IOpenSearchSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
IConnection |
connectionPool | A connection pool implementation that tells the client what nodes are available |
IConnection | connection | An connection implementation that can make API requests |
IOpen |
serializer | A serializer implementation used to serialize requests and deserialize responses |
ConnectionConfiguration(IConnectionPool, IOpenSearchSerializer)
Creates a new instance of Connection
Declaration
public ConnectionConfiguration(IConnectionPool connectionPool, IOpenSearchSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
IConnection |
connectionPool | A connection pool implementation that tells the client what nodes are available |
IOpen |
serializer | A serializer implementation used to serialize requests and deserialize responses |
ConnectionConfiguration(string, ApiKeyAuthenticationCredentials)
Sets up the client to communicate to OpenSearch Cloud using cloudId
,
Cloud
Declaration
public ConnectionConfiguration(string cloudId, ApiKeyAuthenticationCredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
string | cloudId | |
Api |
credentials |
ConnectionConfiguration(string, BasicAuthenticationCredentials)
Sets up the client to communicate to OpenSearch Cloud using cloudId
,
Cloud
Declaration
public ConnectionConfiguration(string cloudId, BasicAuthenticationCredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
string | cloudId | |
Basic |
credentials |
ConnectionConfiguration(Uri, IConnection)
Creates a new instance of Connection
Declaration
public ConnectionConfiguration(Uri uri = null, IConnection connection = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The root of the OpenSearch node we want to connect to. Defaults to http://localhost:9200 |
IConnection | connection | A connection implementation that can make API requests. Defaults to Http |
Fields
| Edit this page View SourceDefaultConnectionLimit
The default connection limit for both OpenSearch.Net and OpenSearch.Client. Defaults to 80
Except for Http
Declaration
public static readonly int DefaultConnectionLimit
Field Value
Type | Description |
---|---|
int |
DefaultDnsRefreshTimeout
The default timeout before a TCP connection is forcefully recycled so that DNS updates come through Defaults to 5 minutes.
Declaration
public static readonly TimeSpan DefaultDnsRefreshTimeout
Field Value
Type | Description |
---|---|
Time |
DefaultPingTimeout
The default ping timeout. Defaults to 2 seconds
Declaration
public static readonly TimeSpan DefaultPingTimeout
Field Value
Type | Description |
---|---|
Time |
DefaultPingTimeoutOnSSL
The default ping timeout when the connection is over HTTPS. Defaults to 5 seconds
Declaration
public static readonly TimeSpan DefaultPingTimeoutOnSSL
Field Value
Type | Description |
---|---|
Time |
DefaultTimeout
The default timeout before the client aborts a request to OpenSearch. Defaults to 1 minute
Declaration
public static readonly TimeSpan DefaultTimeout
Field Value
Type | Description |
---|---|
Time |
DefaultUserAgent
The default user agent for OpenSearch.Net
Declaration
public static readonly string DefaultUserAgent
Field Value
Type | Description |
---|---|
string |