Struct pueue_lib::settings::Shared

source ·
pub struct Shared {
    pub pueue_directory: Option<PathBuf>,
    pub runtime_directory: Option<PathBuf>,
    pub alias_file: Option<PathBuf>,
    pub use_unix_socket: bool,
    pub unix_socket_path: Option<PathBuf>,
    pub host: String,
    pub port: String,
    pub pid_path: Option<PathBuf>,
    pub daemon_cert: Option<PathBuf>,
    pub daemon_key: Option<PathBuf>,
    pub shared_secret_path: Option<PathBuf>,
}
Expand description

All settings which are used by both, the client and the daemon

Fields§

§pueue_directory: Option<PathBuf>

Don’t access this property directly, but rather use the getter with the same name. It’s only public to allow proper integration testing.

The directory that is used for all of pueue’s state.
I.e. task logs, state dumps, etc.

§runtime_directory: Option<PathBuf>

Don’t access this property directly, but rather use the getter with the same name. It’s only public to allow proper integration testing.

The location where runtime related files will be placed. Defaults to pueue_directory unless $XDG_RUNTIME_DIR is set.

§alias_file: Option<PathBuf>

Don’t access this property directly, but rather use the getter with the same name. It’s only public to allow proper integration testing.

The location of the alias file used by the daemon/client when working with aliases.

§use_unix_socket: bool

If this is set to true, unix sockets will be used. Otherwise we default to TCP+TLS

§unix_socket_path: Option<PathBuf>

Don’t access this property directly, but rather use the getter with the same name. It’s only public to allow proper integration testing.

The path to the unix socket.

§host: String

The TCP hostname/ip address.

§port: String

The TCP port.

§pid_path: Option<PathBuf>

The path where the daemon’s PID is located. This is by default in runtime_directory/pueue.pid.

§daemon_cert: Option<PathBuf>

Don’t access this property directly, but rather use the getter with the same name. It’s only public to allow proper integration testing.

The path to the TLS certificate used by the daemon.
This is also used by the client to verify the daemon’s identity.

§daemon_key: Option<PathBuf>

Don’t access this property directly, but rather use the getter with the same name. It’s only public to allow proper integration testing.

The path to the TLS key used by the daemon.

§shared_secret_path: Option<PathBuf>

Don’t access this property directly, but rather use the getter with the same name. It’s only public to allow proper integration testing.

The path to the file containing the shared secret used to authenticate the client.

Implementations§

source§

impl Shared

source

pub fn pueue_directory(&self) -> PathBuf

source

pub fn runtime_directory(&self) -> PathBuf

Get the current runtime directory in the following precedence.

  1. Config value
  2. Environment configuration
  3. Pueue directory
source

pub fn unix_socket_path(&self) -> PathBuf

The unix socket path can either be explicitly specified or it’s simply placed in the current runtime directory.

source

pub fn alias_file(&self) -> PathBuf

The location of the alias file used by the daemon/client when working with task aliases.

source

pub fn pid_path(&self) -> PathBuf

The daemon’s pid path can either be explicitly specified or it’s simply placed in the current runtime directory.

source

pub fn daemon_cert(&self) -> PathBuf

source

pub fn daemon_key(&self) -> PathBuf

source

pub fn shared_secret_path(&self) -> PathBuf

Trait Implementations§

source§

impl Clone for Shared

source§

fn clone(&self) -> Shared

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Shared

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Shared

source§

fn default() -> Shared

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Shared

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<Shared> for Shared

source§

fn eq(&self, other: &Shared) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Shared

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Shared

source§

impl StructuralEq for Shared

source§

impl StructuralPartialEq for Shared

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,