requests

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppendOption

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

AppendOption is a control store get option

type Event

type Event struct {
	// Type is the event type
	Type EventType
	// Request is the request
	Request Request
}

Event is a store event

type EventType

type EventType string

EventType is a store event type

const (
	// EventNone indicates an event that was not triggered but replayed
	EventNone EventType = ""
	// EventAppend indicates the message was appended to the store
	EventAppend EventType = "append"
	// EventRemove indicates the message was removed from the store
	EventRemove EventType = "update"
)

type Index

type Index int64

Index is a message index

type Request

type Request struct {
	*e2ap.RicControlRequest
	// Index is the request index
	Index Index
	// DeviceID is the request device identifier
	DeviceID device.ID
}

Request is a control request

func New

func New(deviceID device.ID, request *e2ap.RicControlRequest) *Request

New creates a new indication

type Store

type Store interface {
	io.Closer

	// Append appends a new request
	Append(*Request, ...AppendOption) error

	// Ack acknowledges a request
	Ack(*Request) error

	// Watch watches the store for changes
	Watch(device.ID, chan<- Event, ...WatchOption) error
}

Store is interface for store

func NewDistributedStore

func NewDistributedStore(config config.Config) (Store, error)

NewDistributedStore creates a new distributed indications store

func NewLocalStore

func NewLocalStore() (Store, error)

NewLocalStore returns a new local indications store

type WatchOption

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

WatchOption is a control request store watch option

func WithReplay

func WithReplay() WatchOption

WithReplay returns a watch option that replays existing messages

Jump to

Keyboard shortcuts

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