retrypolicy

package
v0.22.8 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePolicy

func ValidatePolicy(p *api.RetryPolicy) error

ValidatePolicy checks that a retry policy is structurally valid, so that malformed policies are rejected at write time.

Types

type ErrRetryPolicyNotFound

type ErrRetryPolicyNotFound struct {
	Name string
}

func (*ErrRetryPolicyNotFound) Error

func (err *ErrRetryPolicyNotFound) Error() string

type PostgresRetryPolicyRepository

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

func NewPostgresRetryPolicyRepository

func NewPostgresRetryPolicyRepository(db *pgxpool.Pool) *PostgresRetryPolicyRepository

func (*PostgresRetryPolicyRepository) CreateRetryPolicy

func (r *PostgresRetryPolicyRepository) CreateRetryPolicy(ctx *armadacontext.Context, policy *api.RetryPolicy) error

func (*PostgresRetryPolicyRepository) DeleteRetryPolicy

func (r *PostgresRetryPolicyRepository) DeleteRetryPolicy(ctx *armadacontext.Context, name string) ([]string, error)

DeleteRetryPolicy removes a policy and returns the queues it was detached from. Deleting a non-existent policy is a no-op, consistent with DeleteQueue.

Attachments are deleted explicitly rather than by ON DELETE CASCADE, so RETURNING names the queues this transaction detached, and both this path and queue attachment touch queue_retry_policy before retry_policy.

func (*PostgresRetryPolicyRepository) GetAllRetryPolicies

func (r *PostgresRetryPolicyRepository) GetAllRetryPolicies(ctx *armadacontext.Context) ([]*api.RetryPolicy, error)

func (*PostgresRetryPolicyRepository) GetRetryPolicy

func (*PostgresRetryPolicyRepository) UpdateRetryPolicy

func (r *PostgresRetryPolicyRepository) UpdateRetryPolicy(ctx *armadacontext.Context, policy *api.RetryPolicy) error

type RetryPolicyRepository

type RetryPolicyRepository interface {
	GetAllRetryPolicies(ctx *armadacontext.Context) ([]*api.RetryPolicy, error)
	GetRetryPolicy(ctx *armadacontext.Context, name string) (*api.RetryPolicy, error)
	CreateRetryPolicy(ctx *armadacontext.Context, policy *api.RetryPolicy) error
	UpdateRetryPolicy(ctx *armadacontext.Context, policy *api.RetryPolicy) error
	DeleteRetryPolicy(ctx *armadacontext.Context, name string) ([]string, error)
}

type Server

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

func NewServer

func NewServer(repository RetryPolicyRepository, authorizer auth.ActionAuthorizer) *Server

func (*Server) CreateRetryPolicy

func (s *Server) CreateRetryPolicy(grpcCtx context.Context, req *api.RetryPolicy) (*types.Empty, error)

func (*Server) DeleteRetryPolicy

func (s *Server) DeleteRetryPolicy(grpcCtx context.Context, req *api.RetryPolicyDeleteRequest) (*types.Empty, error)

func (*Server) GetRetryPolicies

func (s *Server) GetRetryPolicies(grpcCtx context.Context, _ *api.RetryPolicyListRequest) (*api.RetryPolicyList, error)

GetRetryPolicies returns all retry policies. Reads require no permission, consistent with GetQueue.

func (*Server) GetRetryPolicy

func (s *Server) GetRetryPolicy(grpcCtx context.Context, req *api.RetryPolicyGetRequest) (*api.RetryPolicy, error)

GetRetryPolicy returns a single retry policy by name. Reads require no permission, consistent with GetQueue.

func (*Server) UpdateRetryPolicy

func (s *Server) UpdateRetryPolicy(grpcCtx context.Context, req *api.RetryPolicy) (*types.Empty, error)

Jump to

Keyboard shortcuts

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