finch/otp
Types related to OTP usage of Finch.
Types
pub type InstanceOption {
Name(Atom)
Pools(Map(PoolSpecifier, PoolOptions))
}
Constructors
-
Name(Atom)
-
Pools(Map(PoolSpecifier, PoolOptions))
pub type InstanceOptions =
List(InstanceOption)
Returned by start_link/2
.
Note that this is not the same as Gleam’s standard Result
type! You will
need to match this manually, it cannot be used with try
syntax.
pub type OnStart {
Ok(child: Pid)
Ignore
Error(Dynamic)
}
Constructors
-
Ok(child: Pid)
-
Ignore
-
Error(Dynamic)
pub type PoolOption {
Protocol(PoolProtocol)
Size(Int)
Count(Int)
MaxIdleTime(Timeout)
ConnOpts(List(#(Atom, Dynamic)))
PoolMaxIdleTime(Timeout)
ConnMaxIdleTime(Timeout)
}
Constructors
-
Protocol(PoolProtocol)
-
Size(Int)
-
Count(Int)
-
MaxIdleTime(Timeout)
-
ConnOpts(List(#(Atom, Dynamic)))
-
PoolMaxIdleTime(Timeout)
-
ConnMaxIdleTime(Timeout)
pub type PoolOptions =
List(PoolOption)
pub type PoolProtocol {
Http1
Http2
}
Constructors
-
Http1
-
Http2
pub type PoolSpecifier {
Default
URL(url: uri.Uri)
UnixSocket(specifier: UnixSocketSpecifier)
}
Constructors
-
Default
-
URL(url: uri.Uri)
-
UnixSocket(specifier: UnixSocketSpecifier)
pub type UnixSocketPath {
Local(path: String)
}
Constructors
-
Local(path: String)
pub type UnixSocketSpecifier {
Http(path: UnixSocketPath)
Https(path: UnixSocketPath)
}
Constructors
-
Http(path: UnixSocketPath)
-
Https(path: UnixSocketPath)