tickets

package
v0.0.0-...-c39517e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDuplicateTicketID = errors.New("duplicate ticket id")

ErrDuplicateTicketID is an error returned when the ticket id given when creating a new ticket already exists

Functions

func GetMatchRequestTopic

func GetMatchRequestTopic(profileName string) string

GetMatchRequestTopic returns a topic name based on the Match Profile a Ticket aligns with

func GetTicketSubject

func GetTicketSubject(ticketID string) string

GetTicketSubject returns a subject to be used with ticket pub-sub

Types

type Manager

type Manager interface {
	CreateTicket(ctx context.Context, ticket *pb.Ticket, filterManager filter.Manager) (*pb.Ticket, error)
	DeleteTicket(ctx context.Context, ticketID string) error
	GetTicket(ctx context.Context, ticketID string) (*pb.Ticket, error)
	GetTickets(ctx context.Context, ticketIDs []string) ([]*pb.Ticket, error)
	WatchTicket(ctx context.Context, ticketID string, f func(ctx context.Context, t *pb.Ticket)) error
	StreamTickets(ctx context.Context, profile string, f func(ctx context.Context, st *pb.StreamTicket, t *pb.Ticket)) error
	AssignTicketsToMatch(ctx context.Context, match *pb.Match) (bool, error)
	ReleaseTicketsFromMatch(ctx context.Context, match *pb.Match) error
	AddAssignmentToTickets(ctx context.Context, assignment *pb.Assignment, tickets []*pb.Ticket) error
	RequeueTickets(ctx context.Context, tickets []*pb.Ticket, filterManager filter.Manager)
	Close()
}

Manager interface specifies our interactions with tickets

func NewManager

func NewManager(kvStore kv.Store, streamClient stream.Client, pubsubClient pubsub.Client) Manager

NewManager returns a new ticket Manager

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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