Documentation
¶
Index ¶
- Constants
- func AdmitLiveDM(ctx context.Context, profileHome, dmFile string, author *pyjson.Object) (map[string]any, error)
- func DMDeliveryID(dmFile string) (string, error)
- func DeliveryMain(ctx context.Context, args []string, stdout, stderr io.Writer) int
- func DispatchEntry(ctx context.Context, exit func(int))
- func ExcText(err error) string
- func LiveIntentFile(dmFile string) string
- func LiveOutcomeUnknown(dmFile, cause string) (string, error)
- func SettledNoSend(dmFile string, exc LiveTargetError) (string, error)
- func UnavailablePayload(dmFile string, exc LiveTargetError) (string, error)
- func UnlinkDMFile(path string)
- func WaitLiveDM(ctx context.Context, stdout io.Writer, home, deliveryID, dmFile string) (int, error)
- func WriteDMFile(content string) (string, error)
- type LiveTargetError
- type LiveTargetHeldError
- type LiveTargetUnavailableError
Constants ¶
const ( LiveWaitSeconds = 300 LiveWaitMaxSeconds = 30 * 60 )
Live owner wait windows, one await budget and the ceiling past which a runner reports pending and exits
Variables ¶
This section is empty.
Functions ¶
func AdmitLiveDM ¶
func AdmitLiveDM(ctx context.Context, profileHome, dmFile string, author *pyjson.Object) (map[string]any, error)
Pins the intent beside a DM file before admission, a retry inspecting the pinned owner and message only
func DMDeliveryID ¶
One delivery id per DM file, the sha256 of its resolved path shared by ack, intent and every retry
func DeliveryMain ¶
Exit status of the runner for the argv the delivery command builds, malformed argv 2
func DispatchEntry ¶
Runs the DM runner and exits when argv carries its entry word, the script run of tools/bot_mode_dm.py
func ExcText ¶
Text a delivery answer quotes for a failure, an OS error with its errno and quoted path
func LiveIntentFile ¶
Pinned live delivery intent beside a DM file, the name the cache sweep globs
func LiveOutcomeUnknown ¶
Runner answer when a live admission may have happened but its outcome is unknown
func SettledNoSend ¶
func SettledNoSend(dmFile string, exc LiveTargetError) (string, error)
Drops the intent and payload of a definite no send, the unknown outcome when either file stays
func UnavailablePayload ¶
func UnavailablePayload(dmFile string, exc LiveTargetError) (string, error)
Runner and tool answer to a definite no send, reason and delivery id with the safe to resend text
func UnlinkDMFile ¶
func UnlinkDMFile(path string)
Removes a DM file or intent, every OS error swallowed
func WaitLiveDM ¶
func WaitLiveDM(ctx context.Context, stdout io.Writer, home, deliveryID, dmFile string) (int, error)
Bounded wait on a live admission printing its outcome, exit 0 for settled or still pending and 1 otherwise
func WriteDMFile ¶
Sweeps stale payloads and stores a message in a fresh private file, never inline shell text
Types ¶
type LiveTargetError ¶
Definite no send refusal of a live target with its typed reason and when the sender may resend
type LiveTargetHeldError ¶
Owner refusal under another session writer that settled this delivery id as never sent
func (*LiveTargetHeldError) Reason ¶
func (e *LiveTargetHeldError) Reason() string
func (*LiveTargetHeldError) Resend ¶
func (e *LiveTargetHeldError) Resend() string
type LiveTargetUnavailableError ¶
Canonical Bot Chat owner unreachable with nothing admitted, a definite no send the sender may retry
func (*LiveTargetUnavailableError) Error ¶
func (e *LiveTargetUnavailableError) Error() string
func (*LiveTargetUnavailableError) Reason ¶
func (e *LiveTargetUnavailableError) Reason() string
func (*LiveTargetUnavailableError) Resend ¶
func (e *LiveTargetUnavailableError) Resend() string