smserver

package module
v0.0.0-...-934d3ae Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArmorMap

type ArmorMap map[string]string

func (ArmorMap) KeyList

func (m ArmorMap) KeyList() []string

func (ArmorMap) KeyMap

func (m ArmorMap) KeyMap() map[string]struct{}

func (ArmorMap) ValueList

func (m ArmorMap) ValueList() []string

type Item

type Item struct {
	Value    string // The value of the item; arbitrary.
	Priority int64  // The priority of the item in the queue.
	// The index is needed by update and is maintained by the heap.Interface methods.
	Index int // The index of the item in the heap.
}

An Item is something we manage in a priority queue.

func (*Item) String

func (i *Item) String() string

type PriorityQueue

type PriorityQueue []*Item

A PriorityQueue implements heap.Interface and holds Items.

func (PriorityQueue) Len

func (pq PriorityQueue) Len() int

func (PriorityQueue) Less

func (pq PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() interface{}

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(x interface{})

func (PriorityQueue) Swap

func (pq PriorityQueue) Swap(i, j int)

type Server

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

func NewServer

func NewServer(fn ...ServerOption) (*Server, error)

func (*Server) Close

func (s *Server) Close()

type ServerOption

type ServerOption func(options *serverOptions)

func WithAddr

func WithAddr(v string) ServerOption

func WithCtx

func WithCtx(v context.Context) ServerOption

func WithEndpoints

func WithEndpoints(v []string) ServerOption

func WithId

func WithId(v string) ServerOption

func WithService

func WithService(v string) ServerOption

func WithStopped

func WithStopped(v chan error) ServerOption

Jump to

Keyboard shortcuts

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