internal

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2016 License: Apache-1.1 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event int

Event is an abstraction for session events

const (
	//PeerTimeout indicates the session peer has become unresponsive
	PeerTimeout Event = iota
	//NeedHeartbeat indicates the session should send a heartbeat
	NeedHeartbeat
	//LogonTimeout indicates the peer has not sent a logon request
	LogonTimeout
	//LogoutTimeout indicates the peer has not sent a logout request
	LogoutTimeout
)

type EventTimer

type EventTimer struct {
	Task func()
	// contains filtered or unexported fields
}

func (*EventTimer) Reset

func (t *EventTimer) Reset(timeout time.Duration) (ok bool)

func (*EventTimer) Stop

func (t *EventTimer) Stop() (ok bool)

type SessionSettings

type SessionSettings struct {
	ResetOnLogon   bool
	RefreshOnLogon bool
	ResetOnLogout  bool
	HeartBtInt     time.Duration
	SessionTime    *TimeRange
	InitiateLogon  bool

	//required on logon for FIX.T.1 messages
	DefaultApplVerID string

	//specific to initiators
	ReconnectInterval    time.Duration
	SocketConnectAddress []string
}

SessionSettings stores all of the configuration for a given session

type TimeOfDay

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

TimeOfDay represents the time of day

func NewTimeOfDay

func NewTimeOfDay(hour, minute, second int) TimeOfDay

NewTimeOfDay returns a newly initialized TimeOfDay

func ParseTimeOfDay

func ParseTimeOfDay(str string) (TimeOfDay, error)

ParseTimeOfDay parses a TimeOfDay from a string in the format HH:MM:SS

type TimeRange

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

TimeRange represents a time band in a given time zone

func NewTimeRangeInLocation

func NewTimeRangeInLocation(start, end TimeOfDay, loc *time.Location) *TimeRange

NewTimeRangeInLocation returns a time range in a given location

func NewUTCTimeRange

func NewUTCTimeRange(start, end TimeOfDay) *TimeRange

NewUTCTimeRange returns a time range in UTC

func NewUTCWeekRange

func NewUTCWeekRange(startTime, endTime TimeOfDay, startDay, endDay time.Weekday) *TimeRange

NewUTCWeekRange returns a weekly TimeRange

func NewWeekRangeInLocation

func NewWeekRangeInLocation(startTime, endTime TimeOfDay, startDay, endDay time.Weekday, loc *time.Location) *TimeRange

NewWeekRangeInLocation returns a time range in a given location

func (*TimeRange) IsInRange

func (r *TimeRange) IsInRange(t time.Time) bool

IsInRange returns true if time t is within in the time range

func (*TimeRange) IsInSameRange

func (r *TimeRange) IsInSameRange(t1, t2 time.Time) bool

IsInSameRange determines if two points in time are in the same time range

Jump to

Keyboard shortcuts

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