Creating a link checker serverless function

The first step is creating a serverless function; there are two components here:

  • The function code
  • The function configuration

Let's create a dedicated directory called fun for storing serverless functions. Serverless functions don't really fit into any of our existing categories; that is, they are not plain packages, they are not services, and they are not commands. We can put the function code and its configuration as a YAML file under the link_checker subdirectory. Later, if we decide to model additional capabilities as serverless functions, then we can create additional subdirectories for each function as follows:

$ tree fun fun └── link_checker     ├── function.yaml     └── link_checker.go

The function ...

Get Hands-On Microservices with Kubernetes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.