github.com/blend/go-sdk@v1.20220411.3/status/doc.go (about)

     1  /*
     2  
     3  Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file.
     5  
     6  */
     7  
     8  /*
     9  Package status provides helpers for building standardized sla status endpoints in web services.
    10  
    11  It provides types to wrap existing actions to track the success and error history of those actions
    12  and then report that history through status endpoints.
    13  
    14  The package provides a `status.Controller` type that is created with the `status.NewController(...)` method:
    15  
    16      statusController := status.New(
    17  		status.OptCheck(
    18  			"redis",
    19  			redisConnection, // implements `status.Checker` for you already
    20  		),
    21  		status.OptCheck(
    22  			"postgres",
    23  			dbConnection, // implements `status.Checker` for you already
    24  		),
    25  	)
    26  	...
    27  	app.Register(statusController)
    28  
    29  The app will now have `/status/sla` and `/status/details` endpoints registered.
    30  */
    31  package status // import "github.com/blend/go-sdk/status"