ommonitor

package module
v0.0.0-...-e128c3e Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 10 Imported by: 0

README

ommonitor

Open Match Tickets Monitoring tool.

demo

Install

go install github.com/DeNA/ommonitor/cmd/ommonitor@latest

Usage

ommonitor connects to Open Match's Redis. For example, you can connect to Redis on Kubernetes with the kubectl port-forward command.

# port-forwarding to Redis
kubectl port-forward -n open-match svc/open-match-redis-master 6379:6379

Run ommonitor with Redis address.

# Run ommonitor
ommonitor 127.0.0.1:6379

Several options are available. See the ommonitor -h for details.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

func NewMonitor

func NewMonitor(redisAddr string, client rueidis.Client, opts ...MonitorOption) *Monitor

func (*Monitor) FetchAllTickets

func (m *Monitor) FetchAllTickets(ctx context.Context) ([]Ticket, error)

func (*Monitor) RedisAddr

func (m *Monitor) RedisAddr() string

type MonitorOption

type MonitorOption interface {
	// contains filtered or unexported methods
}

func WithMinimatch

func WithMinimatch() MonitorOption

type MonitorOptionFunc

type MonitorOptionFunc func(options *monitorOptions)

type Ticket

type Ticket struct {
	TicketID     string
	Status       TicketStatus
	CreatedAt    time.Time
	SearchFields *pb.SearchFields
	Assignment   *pb.Assignment
	ExpiredAt    *time.Time
	Extensions   map[string]*anypb.Any
}

func (*Ticket) HasExpired

func (t *Ticket) HasExpired(now time.Time) bool

type TicketStatus

type TicketStatus string
const (
	TicketStatusActive   TicketStatus = "Active"
	TicketStatusProposed TicketStatus = "Proposed"
	TicketStatusAssigned TicketStatus = "Assigned"
)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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