push

package
v0.17.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAttentionPayload added in v0.10.4

func BuildAttentionPayload(
	agent, project, command, eventID, paneID, host, kind string,
	approvalTotal int,
) []byte

func BuildBlockedPayload

func BuildBlockedPayload(agent, project, command, eventID, paneID, host string, hasApproval bool, approvalTotal int) []byte

func BuildFinishedPayload

func BuildFinishedPayload(agent, project, paneID, host, eventID string) []byte

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(pushDir string, logger *slog.Logger) (*Manager, error)

func (*Manager) Send

func (m *Manager) Send(ctx context.Context, payload []byte)

func (*Manager) Subscribe

func (m *Manager) Subscribe(sub Subscription, replacementSets ...[]string) error

func (*Manager) Subscriptions

func (m *Manager) Subscriptions() []Subscription

func (*Manager) Unsubscribe

func (m *Manager) Unsubscribe(endpoints []string, clientIDs ...string) error

func (*Manager) VAPIDPublicKey

func (m *Manager) VAPIDPublicKey() string

type Subscription

type Subscription struct {
	Endpoint string `json:"endpoint"`
	Keys     struct {
		P256dh string `json:"p256dh"`
		Auth   string `json:"auth"`
	} `json:"keys"`
	UserAgent      string `json:"user_agent,omitempty"`
	NotifyFinished bool   `json:"notify_finished,omitempty"`
	ClientID       string `json:"client_id,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL