Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SailWireSet = wire.NewSet( ProvideSailClient, wire.Bind(new(SailClient), new(sailClient)), ProvideSailRoomer, ProvideSailDialer, )
Functions ¶
func ProvideSailClient ¶
func ProvideSailClient(addr model.SailURL, roomer SailRoomer, dialer SailDialer) *sailClient
Types ¶
type FakeSailClient ¶ added in v0.8.2
type FakeSailClient struct {
ConnectCalls int
}
func NewFakeSailClient ¶ added in v0.8.2
func NewFakeSailClient() *FakeSailClient
func (*FakeSailClient) OnChange ¶ added in v0.8.2
func (c *FakeSailClient) OnChange(ctx context.Context, st store.RStore)
func (*FakeSailClient) SetUp ¶ added in v0.8.2
func (c *FakeSailClient) SetUp(ctx context.Context)
func (*FakeSailClient) TearDown ¶ added in v0.8.2
func (c *FakeSailClient) TearDown(ctx context.Context)
type SailClient ¶
type SailClient interface { store.Subscriber store.SubscriberLifecycle Connect(ctx context.Context, st store.RStore) error }
type SailDialer ¶
type SailDialer interface {
DialContext(ctx context.Context, addr string, headers http.Header) (SailConn, error)
}
Helpers for stubbing out the network connection in sailClient
func ProvideSailDialer ¶
func ProvideSailDialer() SailDialer
type SailRoomConnectedAction ¶ added in v0.8.1
func (SailRoomConnectedAction) Action ¶ added in v0.8.1
func (SailRoomConnectedAction) Action()
type SailRoomer ¶ added in v0.8.1
type SailRoomer interface {
NewRoom(ctx context.Context, version model.WebVersion) (roomID model.RoomID, secret string, err error)
}
For injecting room creation logic (because the real way involves an HTTP request)
func ProvideSailRoomer ¶ added in v0.8.1
func ProvideSailRoomer(addr model.SailURL) SailRoomer
Click to show internal directories.
Click to hide internal directories.