Documentation
¶
Overview ¶
Package nodedaemon contains the entrypoint for webmesh nodes running as an application daemon.
Package nodecmd contains the entrypoint for webmesh nodes.
Index ¶
- Variables
- func DefaultDaemonSocket() string
- func Run(ctx context.Context, conf Config) error
- type AppDaemon
- func (app *AppDaemon) AnnounceDHT(ctx context.Context, req *v1.AnnounceDHTRequest) (*v1.AnnounceDHTResponse, error)
- func (app *AppDaemon) Connect(ctx context.Context, req *v1.ConnectRequest) (*v1.ConnectResponse, error)
- func (app *AppDaemon) Disconnect(ctx context.Context, _ *v1.DisconnectRequest) (*v1.DisconnectResponse, error)
- func (app *AppDaemon) LeaveDHT(ctx context.Context, req *v1.LeaveDHTRequest) (*v1.LeaveDHTResponse, error)
- func (app *AppDaemon) Metrics(ctx context.Context, _ *v1.MetricsRequest) (*v1.MetricsResponse, error)
- func (app *AppDaemon) Publish(ctx context.Context, req *v1.PublishRequest) (*v1.PublishResponse, error)
- func (app *AppDaemon) Query(req *v1.QueryRequest, stream v1.AppDaemon_QueryServer) error
- func (app *AppDaemon) Status(ctx context.Context, _ *v1.StatusRequest) (*v1.StatusResponse, error)
- func (app *AppDaemon) Subscribe(req *v1.SubscribeRequest, srv v1.AppDaemon_SubscribeServer) error
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotConnected is returned when the node is not connected to the mesh. ErrNotConnected = status.Errorf(codes.FailedPrecondition, "not connected") // ErrAlreadyConnected is returned when the node is already connected to the mesh. ErrAlreadyConnected = status.Errorf(codes.FailedPrecondition, "already connected") // ErrAlreadyConnecting is returned when the node is already connecting to the mesh. ErrAlreadyConnecting = status.Errorf(codes.FailedPrecondition, "already connecting") )
Functions ¶
func DefaultDaemonSocket ¶
func DefaultDaemonSocket() string
DefaultDaemonSocket returns the default daemon socket path.
Types ¶
type AppDaemon ¶
type AppDaemon struct { v1.UnimplementedAppDaemonServer // contains filtered or unexported fields }
AppDaemon is the app daemon RPC server.
func (*AppDaemon) AnnounceDHT ¶
func (app *AppDaemon) AnnounceDHT(ctx context.Context, req *v1.AnnounceDHTRequest) (*v1.AnnounceDHTResponse, error)
func (*AppDaemon) Connect ¶
func (app *AppDaemon) Connect(ctx context.Context, req *v1.ConnectRequest) (*v1.ConnectResponse, error)
func (*AppDaemon) Disconnect ¶
func (app *AppDaemon) Disconnect(ctx context.Context, _ *v1.DisconnectRequest) (*v1.DisconnectResponse, error)
func (*AppDaemon) LeaveDHT ¶
func (app *AppDaemon) LeaveDHT(ctx context.Context, req *v1.LeaveDHTRequest) (*v1.LeaveDHTResponse, error)
func (*AppDaemon) Metrics ¶
func (app *AppDaemon) Metrics(ctx context.Context, _ *v1.MetricsRequest) (*v1.MetricsResponse, error)
func (*AppDaemon) Publish ¶
func (app *AppDaemon) Publish(ctx context.Context, req *v1.PublishRequest) (*v1.PublishResponse, error)
func (*AppDaemon) Query ¶
func (app *AppDaemon) Query(req *v1.QueryRequest, stream v1.AppDaemon_QueryServer) error
func (*AppDaemon) Status ¶
func (app *AppDaemon) Status(ctx context.Context, _ *v1.StatusRequest) (*v1.StatusResponse, error)
func (*AppDaemon) Subscribe ¶
func (app *AppDaemon) Subscribe(req *v1.SubscribeRequest, srv v1.AppDaemon_SubscribeServer) error
type Config ¶
type Config struct { // Bind is the bind address for the daemon. Bind string // InsecureSocket uses an insecure socket when binding to a unix socket. InsecureSocket bool // GRPCWeb enables gRPC-Web support. GRPCWeb bool // Config is the configuration of the node. Config *config.Config }
Config is the configuration for the applicaton daeemon.
Click to show internal directories.
Click to hide internal directories.