pub struct ServerConfig {Show 17 fields
pub application_name: String,
pub application_uri: String,
pub product_uri: String,
pub create_sample_keypair: bool,
pub certificate_path: Option<PathBuf>,
pub private_key_path: Option<PathBuf>,
pub certificate_validation: CertificateValidation,
pub pki_dir: PathBuf,
pub discovery_server_url: Option<String>,
pub tcp_config: TcpConfig,
pub limits: Limits,
pub performance: Performance,
pub locale_ids: Vec<String>,
pub user_tokens: BTreeMap<String, ServerUserToken>,
pub discovery_urls: Vec<String>,
pub default_endpoint: Option<String>,
pub endpoints: BTreeMap<String, ServerEndpoint>,
}Fields§
§application_name: StringAn id for this server
application_uri: StringA description for this server
product_uri: StringProduct url
create_sample_keypair: boolAutocreates public / private keypair if they don’t exist. For testing/samples only since you do not have control of the values
certificate_path: Option<PathBuf>Path to a custom certificate, to be used instead of the default .der certificate
private_key_path: Option<PathBuf>Path to a custom private key, to be used instead of the default private key
certificate_validation: CertificateValidationChecks the certificate’s time validity
pki_dir: PathBufPKI folder, either absolute or relative to executable
discovery_server_url: Option<String>Url to a discovery server - adding this string causes the server to assume you wish to register the server with a discovery server.
tcp_config: TcpConfigtcp configuration information
limits: LimitsServer OPA UA limits
performance: PerformanceServer Performance
locale_ids: Vec<String>Supported locale ids
user_tokens: BTreeMap<String, ServerUserToken>User tokens
discovery_urls: Vec<String>discovery endpoint url which may or may not be the same as the service endpoints below.
default_endpoint: Option<String>Default endpoint id
endpoints: BTreeMap<String, ServerEndpoint>Endpoints supported by the server
Implementations§
Source§impl ServerConfig
impl ServerConfig
pub fn new<T>( application_name: T, user_tokens: BTreeMap<String, ServerUserToken>, endpoints: BTreeMap<String, ServerEndpoint>, ) -> Self
pub fn decoding_options(&self) -> DecodingOptions
pub fn add_endpoint(&mut self, id: &str, endpoint: ServerEndpoint)
pub fn read_x509_thumbprints(&mut self)
Sourcepub fn base_endpoint_url(&self) -> String
pub fn base_endpoint_url(&self) -> String
Returns a opc.tcp://server:port url that paths can be appended onto
Sourcepub fn default_endpoint(&self) -> Option<&ServerEndpoint>
pub fn default_endpoint(&self) -> Option<&ServerEndpoint>
Find the default endpoint
Sourcepub fn find_endpoint(
&self,
endpoint_url: &str,
security_policy: SecurityPolicy,
security_mode: MessageSecurityMode,
) -> Option<&ServerEndpoint>
pub fn find_endpoint( &self, endpoint_url: &str, security_policy: SecurityPolicy, security_mode: MessageSecurityMode, ) -> Option<&ServerEndpoint>
Find the first endpoint that matches the specified url, security policy and message security mode.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more