quickfixgo / quickfix

The Go FIX Protocol Library :rocket:

Home Page:https://www.quickfixgo.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expose TimeOfDay / TimeRange structs from time_range.go

MattLicense3 opened this issue · comments

Recently I've found the need to look at the FIX session's configured start / end time. Essentially we have use a shared FIX client across multiple connections with different start/end times, and we're looking to trigger an alert if we receive a logout message during the session time e.g.

func (fa *FixApplication) OnLogout() {
	if fa.inSessionTime() {
		fa.SendAlert("FIX session logged out during session time")
	}
}

Currently that involves us re-parsing the Start/End time config from the session, where this is already done in time_range.go in the internal package. I believe it would be useful to move time_range.go to another package that is exported for public usage, though I'm unsure if there is any specific reason that it hasn't been exported currently.