Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferPool

type BufferPool struct {
	sync.Mutex
	// contains filtered or unexported fields
}

    BufferPool is an concurrently safe pool for byte buffers. Used to constructing inbound messages and writing outbound messages

    func (*BufferPool) Get

    func (p *BufferPool) Get() (buf *bytes.Buffer)

      Get returns a buffer from the pool, or creates a new buffer if the pool is empty

      func (*BufferPool) Put

      func (p *BufferPool) Put(buf *bytes.Buffer)

        Put returns adds a buffer to the pool

        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 {
          	// contains filtered or unexported fields
          }

          func NewEventTimer

          func NewEventTimer(task func()) *EventTimer

          func (*EventTimer) Reset

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

          func (*EventTimer) Stop

          func (t *EventTimer) Stop()

          type SessionSettings

          type SessionSettings struct {
          	ResetOnLogon                 bool
          	RefreshOnLogon               bool
          	ResetOnLogout                bool
          	HeartBtInt                   time.Duration
          	SessionTime                  *TimeRange
          	InitiateLogon                bool
          	ResendRequestChunkSize       int
          	EnableLastMsgSeqNumProcessed bool
          	SkipCheckLatency             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