Documentation ¶
Index ¶
- func MarshalReadableJSON(x interface{}) ([]byte, error)
- func SaveJSON(name string, x interface{}) error
- func SaveJSONLogs(name string, log *public_log.Log, debug *private_log.DebugLog) error
- func SaveReadableJSON(name string, x interface{}) error
- func StartTestServer(ctx context.Context) *bootstrap.TestServer
- type Config
- type FileServer
- func (s *FileServer) GetDebugLog(ctx context.Context, req *private_log.GetDebugLogRequest) (*private_log.GetDebugLogResponse, error)
- func (s *FileServer) GetLog(ctx context.Context, req *public_log.GetLogRequest) (*public_log.GetLogResponse, error)
- func (s *FileServer) SaveLog(ctx context.Context, req *private_log.SaveLogRequest) (*private_log.SaveLogResponse, error)
- type LogServer
- type MemoryServer
- func (s *MemoryServer) GetDebugLog(ctx context.Context, req *private_log.GetDebugLogRequest) (*private_log.GetDebugLogResponse, error)
- func (s *MemoryServer) GetLog(ctx context.Context, req *public_log.GetLogRequest) (*public_log.GetLogResponse, error)
- func (s *MemoryServer) SaveLog(ctx context.Context, req *private_log.SaveLogRequest) (*private_log.SaveLogResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalReadableJSON ¶
func SaveJSONLogs ¶
func SaveJSONLogs(name string, log *public_log.Log, debug *private_log.DebugLog) error
func SaveReadableJSON ¶
func StartTestServer ¶
func StartTestServer(ctx context.Context) *bootstrap.TestServer
Types ¶
type FileServer ¶
type FileServer struct {
// contains filtered or unexported fields
}
FileServer saves logs on disk
func NewFileServer ¶
func NewFileServer(l *zap.Logger, cfg *Config) (*FileServer, error)
func (*FileServer) GetDebugLog ¶
func (s *FileServer) GetDebugLog(ctx context.Context, req *private_log.GetDebugLogRequest) (*private_log.GetDebugLogResponse, error)
func (*FileServer) GetLog ¶
func (s *FileServer) GetLog(ctx context.Context, req *public_log.GetLogRequest) (*public_log.GetLogResponse, error)
func (*FileServer) SaveLog ¶
func (s *FileServer) SaveLog(ctx context.Context, req *private_log.SaveLogRequest) (*private_log.SaveLogResponse, error)
type LogServer ¶
type LogServer interface { private_log.LogServiceServer public_log.LogServiceServer }
type MemoryServer ¶
type MemoryServer struct {
// contains filtered or unexported fields
}
MemoryServer just saves logs in memory
func NewMemoryServer ¶
func NewMemoryServer(cfg *Config) *MemoryServer
func (*MemoryServer) GetDebugLog ¶
func (s *MemoryServer) GetDebugLog(ctx context.Context, req *private_log.GetDebugLogRequest) (*private_log.GetDebugLogResponse, error)
func (*MemoryServer) GetLog ¶
func (s *MemoryServer) GetLog(ctx context.Context, req *public_log.GetLogRequest) (*public_log.GetLogResponse, error)
func (*MemoryServer) SaveLog ¶
func (s *MemoryServer) SaveLog(ctx context.Context, req *private_log.SaveLogRequest) (*private_log.SaveLogResponse, error)
Click to show internal directories.
Click to hide internal directories.