Path: blob/main/component/loki/source/journal/journal_stub.go
4096 views
//go:build !linux || !cgo || !promtail_journal_enabled12package journal34import (5"context"67"github.com/go-kit/log/level"8"github.com/grafana/agent/component"9)1011func init() {12component.Register(component.Registration{13Name: "loki.source.journal",14Args: Arguments{},1516Build: func(opts component.Options, args component.Arguments) (component.Component, error) {17return New(opts, args.(Arguments))18},19})20}2122var _ component.Component = (*Component)(nil)2324// Component represents reading from a journal25type Component struct {26}2728// New creates a new component.29func New(o component.Options, args Arguments) (component.Component, error) {30level.Info(o.Logger).Log("msg", "loki.source.journal is not enabled, and must be ran on linux with journal support")31c := &Component{}32return c, nil33}3435// Run starts the component.36func (c *Component) Run(ctx context.Context) error {37<-ctx.Done()38return nil39}4041// Update updates the fields of the component.42func (c *Component) Update(args component.Arguments) error {43return nil44}454647