Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Service ¶
type Service interface { // HealthCheck indicates if the database is reachable. HealthCheck(ctx context.Context) error // CreateTicket creates a new Ticket in the state storage. If the id already exists, it will be overwritten. CreateTicket(ctx context.Context, ticket *pb.Ticket) error // GetTicket gets the Ticket with the specified id from state storage. This method fails if the Ticket does not exist. GetTicket(ctx context.Context, id string) (*pb.Ticket, error) // DeleteTicket removes the Ticket with the specified id from state storage. This method succeeds if the Ticket does not exist. DeleteTicket(ctx context.Context, id string) error // IndexTicket adds the ticket to the index. IndexTicket(ctx context.Context, ticket *pb.Ticket) error // DeindexTicket removes specified ticket from the index. The Ticket continues to exist. DeindexTicket(ctx context.Context, id string) error // GetIndexedIDSet returns the ids of all tickets currently indexed. GetIndexedIDSet(ctx context.Context) (map[string]struct{}, error) // GetTickets returns multiple tickets from storage. Missing tickets are // silently ignored. GetTickets(ctx context.Context, ids []string) ([]*pb.Ticket, error) // UpdateAssignments update using the request's specified tickets with assignments. UpdateAssignments(ctx context.Context, req *pb.AssignTicketsRequest) (*pb.AssignTicketsResponse, error) // GetAssignments returns the assignment associated with the input ticket id GetAssignments(ctx context.Context, id string, callback func(*pb.Assignment) error) error // AddProposedTickets appends new proposed tickets to the proposed sorted set with current timestamp AddTicketsToIgnoreList(ctx context.Context, ids []string) error // DeleteTicketsFromIgnoreList deletes tickets from the proposed sorted set DeleteTicketsFromIgnoreList(ctx context.Context, ids []string) error // ReleaseAllTickets releases all pending tickets back to active ReleaseAllTickets(ctx context.Context) error // Closes the connection to the underlying storage. Close() error }
Service is a generic interface for talking to a storage backend.
Click to show internal directories.
Click to hide internal directories.