Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.1.1
type Config struct { // Auth IdentityEndpoint string KeyFile string UserID string Username string Password string ProjectID string // Server ServerHostPort string Tls string TlsVerify string // Tagging ServiceID string GroupID string StreamID string DefaultPayload string PayloadTemplate map[string]interface{} InternalRaw string Internal bool // Parsing MessageKey string LevelKey string DefaultLevel string GroupIDKey string StreamIDKey string }
type LogServiceClientMock ¶
type LogServiceClientMock struct { // WriteFunc mocks the Write method. WriteFunc func(ctx context.Context, in *gen.WriteRequest, opts ...grpc.CallOption) (*gen.WriteResponse, error) // contains filtered or unexported fields }
LogServiceClientMock is a mock implementation of gen.LogServiceClient.
func TestSomethingThatUsesLogServiceClient(t *testing.T) { // make and configure a mocked gen.LogServiceClient mockedLogServiceClient := &LogServiceClientMock{ WriteFunc: func(ctx context.Context, in *gen.WriteRequest, opts ...grpc.CallOption) (*gen.WriteResponse, error) { panic("mock out the Write method") }, } // use mockedLogServiceClient in code that requires gen.LogServiceClient // and then make assertions. }
func (*LogServiceClientMock) Write ¶
func (mock *LogServiceClientMock) Write(ctx context.Context, in *gen.WriteRequest, opts ...grpc.CallOption) (*gen.WriteResponse, error)
Write calls WriteFunc.
func (*LogServiceClientMock) WriteCalls ¶
func (mock *LogServiceClientMock) WriteCalls() []struct { Ctx context.Context In *gen.WriteRequest Opts []grpc.CallOption }
WriteCalls gets all the calls that were made to Write. Check the length with:
len(mockedLogServiceClient.WriteCalls())
type VKCloudLogs ¶
type VKCloudLogs struct { ApiClient gen.LogServiceClient Token string Logger *zap.SugaredLogger // contains filtered or unexported fields }
func NewVKCloudLogs ¶
func NewVKCloudLogs(cfg *Config, buildVersion string) (*VKCloudLogs, error)
func (*VKCloudLogs) Init ¶
func (p *VKCloudLogs) Init() (err error)
Click to show internal directories.
Click to hide internal directories.