Documentation ¶
Overview ¶
Package client is a generated GoMock package.
Package client is a generated GoMock package.
Package client is a generated GoMock package.
Package client is a generated GoMock package.
Package client is a generated GoMock package.
Index ¶
- Constants
- type GrpcClient
- type InitializedStreamGetter
- type InitializedStreamPusher
- type LogResponse
- type MockClient
- type MockClientMockRecorder
- type MockInitializedStreamGetter
- type MockInitializedStreamGetterMockRecorder
- type MockInitializedStreamPusher
- func (m *MockInitializedStreamPusher) EXPECT() *MockInitializedStreamPusherMockRecorder
- func (m *MockInitializedStreamPusher) Init(arg0 context.Context, arg1 string) (StreamMetadata, error)
- func (m *MockInitializedStreamPusher) Push(arg0 context.Context, arg1 string, arg2 *events.Log) error
- func (m *MockInitializedStreamPusher) PushBytes(arg0 context.Context, arg1 string, arg2 []byte) error
- type MockInitializedStreamPusherMockRecorder
- type MockStream
- func (m *MockStream) EXPECT() *MockStreamMockRecorder
- func (m *MockStream) Finish(arg0 context.Context, arg1 string) error
- func (m *MockStream) Get(arg0 context.Context, arg1 string) (chan events.LogResponse, error)
- func (m *MockStream) Init(arg0 context.Context, arg1 string) (StreamMetadata, error)
- func (m *MockStream) Push(arg0 context.Context, arg1 string, arg2 *events.Log) error
- func (m *MockStream) PushBytes(arg0 context.Context, arg1 string, arg2 []byte) error
- func (m *MockStream) Start(arg0 context.Context, arg1 string) (StreamResponse, error)
- func (m *MockStream) Stop(arg0 context.Context, arg1 string) (StreamResponse, error)
- type MockStreamGetter
- type MockStreamGetterMockRecorder
- type MockStreamMockRecorder
- func (mr *MockStreamMockRecorder) Finish(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStreamMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStreamMockRecorder) Init(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStreamMockRecorder) Push(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStreamMockRecorder) PushBytes(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStreamMockRecorder) Start(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockStreamMockRecorder) Stop(arg0, arg1 interface{}) *gomock.Call
- type NatsLogStream
- func (c NatsLogStream) Finish(ctx context.Context, id string) error
- func (c NatsLogStream) Get(ctx context.Context, id string) (chan events.LogResponse, error)
- func (c NatsLogStream) Init(ctx context.Context, id string) (StreamMetadata, error)
- func (c NatsLogStream) Push(ctx context.Context, id string, log *events.Log) error
- func (c NatsLogStream) PushBytes(ctx context.Context, id string, bytes []byte) error
- func (c NatsLogStream) Start(ctx context.Context, id string) (resp StreamResponse, err error)
- func (c NatsLogStream) Stop(ctx context.Context, id string) (resp StreamResponse, err error)
- type Stream
- type StreamConfigurer
- type StreamFinisher
- type StreamGetter
- type StreamInitializer
- type StreamMetadata
- type StreamPusher
- type StreamResponse
- type StreamTrigger
Constants ¶
const ( StreamPrefix = "log" StartSubject = "events.logs.start" StopSubject = "events.logs.stop" )
const ConsumerPrefix = "lc"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcClient ¶
type GrpcClient struct {
// contains filtered or unexported fields
}
func (GrpcClient) Get ¶
func (c GrpcClient) Get(ctx context.Context, id string) (chan events.LogResponse, error)
Get returns channel with log stream chunks for given execution id connects through GRPC to log service
type InitializedStreamGetter ¶ added in v1.16.25
type InitializedStreamGetter interface { StreamInitializer StreamGetter }
type InitializedStreamPusher ¶ added in v1.16.25
type InitializedStreamPusher interface { StreamInitializer StreamPusher }
type LogResponse ¶
type MockClient ¶ added in v1.16.26
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶ added in v1.16.26
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) EXPECT ¶ added in v1.16.26
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClient) Get ¶ added in v1.16.26
func (m *MockClient) Get(arg0 context.Context, arg1 string) chan events.LogResponse
Get mocks base method.
type MockClientMockRecorder ¶ added in v1.16.26
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) Get ¶ added in v1.16.26
func (mr *MockClientMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call
Get indicates an expected call of Get.
type MockInitializedStreamGetter ¶ added in v1.16.25
type MockInitializedStreamGetter struct {
// contains filtered or unexported fields
}
MockInitializedStreamGetter is a mock of InitializedStreamGetter interface.
func NewMockInitializedStreamGetter ¶ added in v1.16.25
func NewMockInitializedStreamGetter(ctrl *gomock.Controller) *MockInitializedStreamGetter
NewMockInitializedStreamGetter creates a new mock instance.
func (*MockInitializedStreamGetter) EXPECT ¶ added in v1.16.25
func (m *MockInitializedStreamGetter) EXPECT() *MockInitializedStreamGetterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockInitializedStreamGetter) Get ¶ added in v1.16.25
func (m *MockInitializedStreamGetter) Get(arg0 context.Context, arg1 string) (chan events.LogResponse, error)
Get mocks base method.
func (*MockInitializedStreamGetter) Init ¶ added in v1.16.25
func (m *MockInitializedStreamGetter) Init(arg0 context.Context, arg1 string) (StreamMetadata, error)
Init mocks base method.
type MockInitializedStreamGetterMockRecorder ¶ added in v1.16.25
type MockInitializedStreamGetterMockRecorder struct {
// contains filtered or unexported fields
}
MockInitializedStreamGetterMockRecorder is the mock recorder for MockInitializedStreamGetter.
func (*MockInitializedStreamGetterMockRecorder) Get ¶ added in v1.16.25
func (mr *MockInitializedStreamGetterMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockInitializedStreamGetterMockRecorder) Init ¶ added in v1.16.25
func (mr *MockInitializedStreamGetterMockRecorder) Init(arg0, arg1 interface{}) *gomock.Call
Init indicates an expected call of Init.
type MockInitializedStreamPusher ¶ added in v1.16.25
type MockInitializedStreamPusher struct {
// contains filtered or unexported fields
}
MockInitializedStreamPusher is a mock of InitializedStreamPusher interface.
func NewMockInitializedStreamPusher ¶ added in v1.16.25
func NewMockInitializedStreamPusher(ctrl *gomock.Controller) *MockInitializedStreamPusher
NewMockInitializedStreamPusher creates a new mock instance.
func (*MockInitializedStreamPusher) EXPECT ¶ added in v1.16.25
func (m *MockInitializedStreamPusher) EXPECT() *MockInitializedStreamPusherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockInitializedStreamPusher) Init ¶ added in v1.16.25
func (m *MockInitializedStreamPusher) Init(arg0 context.Context, arg1 string) (StreamMetadata, error)
Init mocks base method.
type MockInitializedStreamPusherMockRecorder ¶ added in v1.16.25
type MockInitializedStreamPusherMockRecorder struct {
// contains filtered or unexported fields
}
MockInitializedStreamPusherMockRecorder is the mock recorder for MockInitializedStreamPusher.
func (*MockInitializedStreamPusherMockRecorder) Init ¶ added in v1.16.25
func (mr *MockInitializedStreamPusherMockRecorder) Init(arg0, arg1 interface{}) *gomock.Call
Init indicates an expected call of Init.
func (*MockInitializedStreamPusherMockRecorder) Push ¶ added in v1.16.25
func (mr *MockInitializedStreamPusherMockRecorder) Push(arg0, arg1, arg2 interface{}) *gomock.Call
Push indicates an expected call of Push.
func (*MockInitializedStreamPusherMockRecorder) PushBytes ¶ added in v1.16.25
func (mr *MockInitializedStreamPusherMockRecorder) PushBytes(arg0, arg1, arg2 interface{}) *gomock.Call
PushBytes indicates an expected call of PushBytes.
type MockStream ¶ added in v1.16.25
type MockStream struct {
// contains filtered or unexported fields
}
MockStream is a mock of Stream interface.
func NewMockStream ¶ added in v1.16.25
func NewMockStream(ctrl *gomock.Controller) *MockStream
NewMockStream creates a new mock instance.
func (*MockStream) EXPECT ¶ added in v1.16.25
func (m *MockStream) EXPECT() *MockStreamMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStream) Finish ¶ added in v1.16.29
func (m *MockStream) Finish(arg0 context.Context, arg1 string) error
Finish mocks base method.
func (*MockStream) Get ¶ added in v1.16.25
func (m *MockStream) Get(arg0 context.Context, arg1 string) (chan events.LogResponse, error)
Get mocks base method.
func (*MockStream) Init ¶ added in v1.16.25
func (m *MockStream) Init(arg0 context.Context, arg1 string) (StreamMetadata, error)
Init mocks base method.
func (*MockStream) Start ¶ added in v1.16.25
func (m *MockStream) Start(arg0 context.Context, arg1 string) (StreamResponse, error)
Start mocks base method.
func (*MockStream) Stop ¶ added in v1.16.25
func (m *MockStream) Stop(arg0 context.Context, arg1 string) (StreamResponse, error)
Stop mocks base method.
type MockStreamGetter ¶ added in v1.16.25
type MockStreamGetter struct {
// contains filtered or unexported fields
}
MockStreamGetter is a mock of StreamGetter interface.
func NewMockStreamGetter ¶ added in v1.16.25
func NewMockStreamGetter(ctrl *gomock.Controller) *MockStreamGetter
NewMockStreamGetter creates a new mock instance.
func (*MockStreamGetter) EXPECT ¶ added in v1.16.25
func (m *MockStreamGetter) EXPECT() *MockStreamGetterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStreamGetter) Get ¶ added in v1.16.25
func (m *MockStreamGetter) Get(arg0 context.Context, arg1 string) (chan events.LogResponse, error)
Get mocks base method.
type MockStreamGetterMockRecorder ¶ added in v1.16.25
type MockStreamGetterMockRecorder struct {
// contains filtered or unexported fields
}
MockStreamGetterMockRecorder is the mock recorder for MockStreamGetter.
func (*MockStreamGetterMockRecorder) Get ¶ added in v1.16.25
func (mr *MockStreamGetterMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call
Get indicates an expected call of Get.
type MockStreamMockRecorder ¶ added in v1.16.25
type MockStreamMockRecorder struct {
// contains filtered or unexported fields
}
MockStreamMockRecorder is the mock recorder for MockStream.
func (*MockStreamMockRecorder) Finish ¶ added in v1.16.29
func (mr *MockStreamMockRecorder) Finish(arg0, arg1 interface{}) *gomock.Call
Finish indicates an expected call of Finish.
func (*MockStreamMockRecorder) Get ¶ added in v1.16.25
func (mr *MockStreamMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockStreamMockRecorder) Init ¶ added in v1.16.25
func (mr *MockStreamMockRecorder) Init(arg0, arg1 interface{}) *gomock.Call
Init indicates an expected call of Init.
func (*MockStreamMockRecorder) Push ¶ added in v1.16.25
func (mr *MockStreamMockRecorder) Push(arg0, arg1, arg2 interface{}) *gomock.Call
Push indicates an expected call of Push.
func (*MockStreamMockRecorder) PushBytes ¶ added in v1.16.25
func (mr *MockStreamMockRecorder) PushBytes(arg0, arg1, arg2 interface{}) *gomock.Call
PushBytes indicates an expected call of PushBytes.
func (*MockStreamMockRecorder) Start ¶ added in v1.16.25
func (mr *MockStreamMockRecorder) Start(arg0, arg1 interface{}) *gomock.Call
Start indicates an expected call of Start.
func (*MockStreamMockRecorder) Stop ¶ added in v1.16.25
func (mr *MockStreamMockRecorder) Stop(arg0, arg1 interface{}) *gomock.Call
Stop indicates an expected call of Stop.
type NatsLogStream ¶
type NatsLogStream struct {
// contains filtered or unexported fields
}
func (NatsLogStream) Finish ¶ added in v1.16.29
func (c NatsLogStream) Finish(ctx context.Context, id string) error
func (NatsLogStream) Get ¶
func (c NatsLogStream) Get(ctx context.Context, id string) (chan events.LogResponse, error)
Get returns channel with log stream chunks for given execution id connects through GRPC to log service
func (NatsLogStream) Init ¶
func (c NatsLogStream) Init(ctx context.Context, id string) (StreamMetadata, error)
func (NatsLogStream) PushBytes ¶
Push log chunk to NATS stream TODO handle message repeat with backoff strategy on error
func (NatsLogStream) Start ¶
func (c NatsLogStream) Start(ctx context.Context, id string) (resp StreamResponse, err error)
Start emits start event to the stream - logs service will handle start and create new stream
func (NatsLogStream) Stop ¶
func (c NatsLogStream) Stop(ctx context.Context, id string) (resp StreamResponse, err error)
Stop emits stop event to the stream and waits for given stream to be stopped fully - logs service will handle stop and close stream and all subscribers
type Stream ¶
type Stream interface { StreamInitializer StreamPusher StreamTrigger StreamGetter StreamFinisher }
func NewNatsLogStream ¶
type StreamConfigurer ¶
type StreamFinisher ¶ added in v1.16.29
type StreamGetter ¶
type StreamGetter interface { // Init creates or updates stream on demand Get(ctx context.Context, id string) (chan events.LogResponse, error) }
StreamGetter interface for getting logs stream channel
func NewGrpcClient ¶
func NewGrpcClient(address string) StreamGetter
NewGrpcClient imlpements getter interface for log stream for given ID
type StreamInitializer ¶
type StreamInitializer interface { // Init creates or updates stream on demand Init(ctx context.Context, id string) (meta StreamMetadata, err error) }
type StreamMetadata ¶
type StreamMetadata struct {
Name string
}
type StreamPusher ¶
type StreamResponse ¶
type StreamTrigger ¶
type StreamTrigger interface { // Trigger start event Start(ctx context.Context, id string) (StreamResponse, error) // Trigger stop event Stop(ctx context.Context, id string) (StreamResponse, error) }